Go to All Forums

custom plugin: how to configure plugin thresholds to trigger alarm notifications by email

Hi there,

I wrote a custom plugin under linux / py and it works pretty well. Metrics were collected by site24x7, perfect.

However, if I want to configure the threshold and want to get notified by email as soon as the limit has been reachhed. The pitty is, I can set the threshold lets say to the value 3 and this will be actually discovered by Site24x7, but the status turns just to in trouble, and... no notification will be send.

So, what do I need to do that a reached plugin threshold will trigger alarm notifications by email?


Here the code of my plugin.

  1. #!/usr/bin/python

    import json

    METRICS_UNITS={'mailqueue':'Emails'}

    def metricCollector():

    data = {}

    data['plugin_version'] = 1

    data['heartbeat_required'] = 'true'

    data['mailqueue']=8

    data['units']=METRICS_UNITS

    return data

    if __name__ == '__main__':

    result = metricCollector()

    print(json.dumps(result, indent=4, sort_keys=True))

     



Thank in advance

Markus

Like (1) Reply
Replies (1)

Re: custom plugin: how to configure plugin thresholds to trigger alarm notifications by email

Hi,

Alarm Notifications for plugins will be triggered automatically. Email will be triggered to the Contacts present in the user groups mapped to the plugin monitor.

Please check for email having the subject 'Monitor display name is in Trouble' from noreply@site24x7.com and also check in spam folder.

Please send your Site24x7 Account information to support@site24x7.com to analyse the issue.

Regards
Anita
Like (0) Reply

Was this post helpful?