ops-center / searchlight

🔦 Alerts for Kubernetes
https://appscode.com/products/searchlight
Apache License 2.0
321 stars 24 forks source link

Custom notifier messages #239

Open DanielHouston opened 6 years ago

DanielHouston commented 6 years ago

It would be great to customize SMS, Email and HipChat notifications with custom templates. Looking particularly at SMS alerts, there are clear variables (Service name, namespace, cluster, state) around which you could build custom messages.

Current: Service [myservice] for [demo@cluster] is in "CRITICAL" state

With a template stored in the cluster named SMS_TEMPLATE or something: Searchlight monitoring has triggered: Your Service %service_name% in namespace %ns% on cluster %cluster% is in %state% state

resulting in: Searchlight monitoring has triggered: Your Service "myservice" in namespace "demo" on cluster "cluster" is in CRITICAL state

Similarly, a HTML template could be used for emails

DanielHouston commented 6 years ago

From my understanding of the codebase; making sms.go etc configurable based on a template wouldn't be too hard. The difficulty would be in exposing that configuration to the user while maintaining a simple deployment (as it's all compiled and shipped as a container.)