Last active
August 23, 2017 11:18
-
-
Save koemu/b0156ba1209e60290da3f7fb090755d6 to your computer and use it in GitHub Desktop.
Makcerel agent configuration
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
apikey = "?" | |
# metric plugins | |
[plugin.metrics.nginx] | |
command = "/usr/bin/mackerel-plugin-nginx" | |
type = "metric" | |
[plugin.metrics.linux] | |
command = "/usr/bin/mackerel-plugin-linux" | |
type = "metric" | |
[plugin.metrics.memcached] | |
command = "/usr/bin/mackerel-plugin-memcached" | |
type = "metric" | |
[plugin.metrics.mysql] | |
command = "/usr/bin/mackerel-plugin-mysql --username=? --password=? --host=127.0.0.1" | |
type = "metric" | |
[plugin.metrics.php_fpm] | |
command = "/usr/bin/mackerel-plugin-php-fpm --url 'http://localhost:8080/php-fpm_status?json'" | |
type = "metric" | |
# check plugins | |
[plugin.checks.check_procs_chronyd] | |
command = "/usr/lib64/nagios/plugins/check_procs -w 1: -a chronyd" | |
max_check_attempts = 3 | |
notification_interval = 180 | |
[plugin.checks.check_procs_nginx] | |
command = "/usr/lib64/nagios/plugins/check_procs -w 1: -a nginx" | |
max_check_attempts = 3 | |
notification_interval = 180 | |
[plugin.checks.check_procs_mysqld] | |
command = "/usr/lib64/nagios/plugins/check_procs -w 1: -a mysqld" | |
max_check_attempts = 3 | |
notification_interval = 180 | |
[plugin.checks.check_smtp] | |
command = "/usr/lib64/nagios/plugins/check_smtp -w 0.1 -c 0.2 -t 1" | |
max_check_attempts = 3 | |
notification_interval = 180 | |
[plugin.checks.check_procs_postfix] | |
command = "/usr/lib64/nagios/plugins/check_procs -w 1: -a /usr/libexec/postfix/master" | |
max_check_attempts = 3 | |
notification_interval = 180 | |
[plugin.checks.check_ssh] | |
command = "/usr/lib64/nagios/plugins/check_ssh -t 1 localhost" | |
max_check_attempts = 3 | |
notification_interval = 180 | |
[plugin.checks.check_http_www_koemu_com] | |
command = "/usr/lib64/nagios/plugins/check_http -w 0.1 -c 0.3 -t 1 -I localhost -H www.koemu.com -u /blog/about/ -S -s 'koemu'" | |
max_check_attempts = 3 | |
notification_interval = 180 | |
[plugin.checks.check_http_blog_koemu_net] | |
command = "/usr/lib64/nagios/plugins/check_http -w 0.1 -c 0.3 -t 1 -I localhost -H blog.koemu.net -s 'koemu'" | |
max_check_attempts = 3 | |
notification_interval = 180 | |
[plugin.checks.check_ntp_time] | |
command = "/usr/lib64/nagios/plugins/check_ntp_time -w 1 -c 3 -H ntp.jst.mfeed.ad.jp" | |
max_check_attempts = 3 | |
notification_interval = 180 | |
[plugin.checks.check_mysql] | |
command = "/usr/lib64/nagios/plugins/check_mysql -u ? -p ? -w 1 -c 3" | |
max_check_attempts = 3 | |
notification_interval = 180 | |
[plugin.checks.check_procs_memcached] | |
command = "/usr/lib64/nagios/plugins/check_procs -w 1: -a memcached" | |
max_check_attempts = 3 | |
notification_interval = 180 | |
[plugin.checks.check_procs_php_fpm] | |
command = "/usr/lib64/nagios/plugins/check_procs -w 16: -a 'php-fpm: pool www'" | |
max_check_attempts = 3 | |
notification_interval = 180 |
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
[ | |
{ | |
"id": "?", | |
"name": "I/O Wait", | |
"type": "host", | |
"metric": "cpu.iowait.percentage", | |
"operator": ">", | |
"warning": 30, | |
"critical": 50, | |
"duration": 3 | |
}, | |
{ | |
"id": "?", | |
"name": "Load Average", | |
"type": "host", | |
"metric": "loadavg5", | |
"operator": ">", | |
"warning": 2, | |
"critical": 3, | |
"duration": 3 | |
}, | |
{ | |
"id": "?", | |
"name": "MySQL Connections", | |
"type": "host", | |
"metric": "custom.mysql.capacity.PercentageOfConnections", | |
"operator": ">", | |
"warning": 70, | |
"critical": 90, | |
"duration": 3 | |
}, | |
{ | |
"id": "?", | |
"name": "MySQL InnoDB Buffer Pool Capacity", | |
"type": "host", | |
"notificationInterval": 60, | |
"metric": "custom.mysql.capacity.PercentageOfBufferPool", | |
"operator": ">", | |
"warning": 80, | |
"critical": 95, | |
"duration": 3 | |
}, | |
{ | |
"id": "?", | |
"name": "PHP FPM Connections", | |
"type": "host", | |
"notificationInterval": 60, | |
"metric": "custom.php-fpm.processes.active_processes", | |
"operator": ">", | |
"warning": 10, | |
"critical": 12, | |
"duration": 3 | |
}, | |
{ | |
"id": "?", | |
"name": "Swap IN", | |
"type": "host", | |
"metric": "custom.linux.swap.pswpin", | |
"operator": ">", | |
"warning": 1000, | |
"critical": 5000, | |
"duration": 3 | |
}, | |
{ | |
"id": "?", | |
"name": "ログインユーザ数", | |
"type": "host", | |
"metric": "custom.linux.users.users", | |
"operator": ">", | |
"warning": 3, | |
"critical": 5, | |
"duration": 3 | |
}, | |
{ | |
"id": "?", | |
"name": "CPU Usage", | |
"type": "host", | |
"metric": "cpu%", | |
"operator": ">", | |
"warning": 70, | |
"critical": 90, | |
"duration": 3 | |
}, | |
{ | |
"id": "?", | |
"name": "Disk Capacity", | |
"type": "host", | |
"notificationInterval": 180, | |
"metric": "disk%", | |
"operator": ">", | |
"warning": 70, | |
"critical": 90, | |
"duration": 3 | |
}, | |
{ | |
"id": "?", | |
"name": "Memory Usage", | |
"type": "host", | |
"metric": "memory%", | |
"operator": ">", | |
"warning": 85, | |
"critical": 95, | |
"duration": 3 | |
}, | |
{ | |
"id": "?", | |
"name": "connectivity", | |
"type": "connectivity" | |
}, | |
{ | |
"id": "?", | |
"name": "外形監視 blog.koemu.net", | |
"type": "external", | |
"method": "GET", | |
"url": "http://blog.koemu.net/", | |
"maxCheckAttempts": 3, | |
"service": "Default", | |
"responseTimeCritical": 1200, | |
"responseTimeWarning": 300, | |
"responseTimeDuration": 1, | |
"containsString": "koemu", | |
"headers": [ | |
{ | |
"name": "Cache-Control", | |
"value": "no-cache" | |
} | |
] | |
}, | |
{ | |
"id": "?", | |
"name": "外形監視 www.koemu.com", | |
"type": "external", | |
"notificationInterval": 30, | |
"method": "GET", | |
"url": "https://www.koemu.com/blog/about/", | |
"maxCheckAttempts": 3, | |
"service": "Default", | |
"responseTimeCritical": 1000, | |
"responseTimeWarning": 250, | |
"responseTimeDuration": 1, | |
"containsString": "koemu", | |
"certificationExpirationCritical": 20, | |
"certificationExpirationWarning": 60, | |
"headers": [ | |
{ | |
"name": "Cache-Control", | |
"value": "no-cache" | |
} | |
] | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment