I have this problem where I keep getting excessive alerts for the trigger below. At first I thought the trigger was broken. But looking a little close I think it's doing exactly what it's told to do.
"{Template_Template_Name:jettyDBConns.last(0,600)} >24"
If jettyDBConns exceeds 24 in a 600 second time frame then trigger..
Am I reading that correctly? Just for the record this is a custom trigger that is in the /etc/zabbix/zabbix_agentd.conf.d/zabbix-userparams.conf and that parameter is
UserParameter=jettyDBConns,rdsName=`fgrep rds.amazonaws.com /<path_to>/settings.js | cut -d'@' -f2 | cut -d':' -f1` && rdsNameString=`nslookup $rdsName| tail -2 | head -1 | cut -d' ' -f2 | tr '.' '-'` && jettypid=`ps -ef | grep ringojs | fgrep -v grep | awk '{print $2}'` && sudo lsof -p $jettypid | fgrep TCP | fgrep $HOSTNAME | wc -l
This thing will trigger, and then immediately go to an OK status.. Sometimes it will trigger more than 50 times in an 8 hour period..
So I created this one liner..
while :; do date | tee -a /tmp/jetty_test.out;rdsName=`fgrep rds.amazonaws.com /opt/<path_to>/settings.js | cut -d'@' -f2 | cut -d':' -f1` && rdsNameString=`nslookup $rdsName| tail -2 | head -1 | cut -d' ' -f2 | tr '.' '-'` && jettypid=`ps -ef | grep ringojs | fgrep -v grep | awk '{print $2}'` && sudo lsof -p $jettypid | fgrep TCP | fgrep $HOSTNAME | wc -l | tee -a /tmp/jetty_test.out; sleep 1s;done
From the perspective of immediate, there doesn't seem to be any sense to make when the trigger goes off. I haven't looked at the 10 minute view yet.
Thanks,
J
"{Template_Template_Name:jettyDBConns.last(0,600)} >24"
If jettyDBConns exceeds 24 in a 600 second time frame then trigger..
Am I reading that correctly? Just for the record this is a custom trigger that is in the /etc/zabbix/zabbix_agentd.conf.d/zabbix-userparams.conf and that parameter is
UserParameter=jettyDBConns,rdsName=`fgrep rds.amazonaws.com /<path_to>/settings.js | cut -d'@' -f2 | cut -d':' -f1` && rdsNameString=`nslookup $rdsName| tail -2 | head -1 | cut -d' ' -f2 | tr '.' '-'` && jettypid=`ps -ef | grep ringojs | fgrep -v grep | awk '{print $2}'` && sudo lsof -p $jettypid | fgrep TCP | fgrep $HOSTNAME | wc -l
This thing will trigger, and then immediately go to an OK status.. Sometimes it will trigger more than 50 times in an 8 hour period..
So I created this one liner..
while :; do date | tee -a /tmp/jetty_test.out;rdsName=`fgrep rds.amazonaws.com /opt/<path_to>/settings.js | cut -d'@' -f2 | cut -d':' -f1` && rdsNameString=`nslookup $rdsName| tail -2 | head -1 | cut -d' ' -f2 | tr '.' '-'` && jettypid=`ps -ef | grep ringojs | fgrep -v grep | awk '{print $2}'` && sudo lsof -p $jettypid | fgrep TCP | fgrep $HOSTNAME | wc -l | tee -a /tmp/jetty_test.out; sleep 1s;done
From the perspective of immediate, there doesn't seem to be any sense to make when the trigger goes off. I haven't looked at the 10 minute view yet.
Thanks,
J
Comment