Created
December 7, 2015 20:49
-
-
Save joeashcraft/258b6cf8b0c01a6c5675 to your computer and use it in GitHub Desktop.
config file for agent.mysql check with 1 alarm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type : agent.mysql | |
label : "MySQL Metrics" | |
disabled : false | |
period : 60 | |
timeout : 30 | |
details : | |
username : "raxmon" | |
password : "password" | |
alarms: | |
alarm1: | |
label: 'Max Connections' | |
notification_plan_id : npManaged | |
criteria : | | |
:set consecutiveCount=3 | |
if( percentage( metric['threads.connected'], metric['max.connections'] ) > 90 ) { | |
return new AlarmStatus(CRITICAL, "Connection count is greater than 90% of max-connections for 3 minutes"); | |
} | |
if( percentage( metric['threads.connected'], metric['max.connections'] ) > 80 ) { | |
return new AlarmStatus(WARNING, "Connection count is greater than 80% of max-connections for 3 minutes"); | |
} | |
return new AlarmStatus(OK, "Connection count is nominal"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment