wongnai / kube-slack

Kubernetes Slack Monitoring
MIT License
322 stars 58 forks source link

Support other logging URLs besides Kibana #4

Closed fhemberger closed 7 years ago

fhemberger commented 7 years ago

It would be nice to customize the logging url for other services than Kibana. Maybe by adding LOGGING_URL with some kind of placeholders for container and pod to be replaced by a RegExp?

Example:

let loggingUrl = '';
if (process.env.LOGGING_URL) {
  loggingUrl = process.env.KIBANA_URL
    .replace('%%pod%%', encodeURIComponent(item.pod.metadata.name))
    .replace('%%container%%', encodeURIComponent(item.name));

  loggingUrl = `(<${loggingUrl}|View logs>)`;
}
whs commented 7 years ago

Fixed in 08afa3a840429b083afc6100150b3e9c66034344 . If you're running with latest tag please see the update instruction in readme. (Although I would recommend pinning your version instead)

fhemberger commented 7 years ago

Cool, thank you!