using nagios to monitor your wo systems
TRANSCRIPT
![Page 1: Using Nagios to monitor your WO systems](https://reader033.vdocuments.us/reader033/viewer/2022060107/55496169b4c905f74e8b5ac3/html5/thumbnails/1.jpg)
Nagios for WO systemsPascal Robert Druide informatique
![Page 2: Using Nagios to monitor your WO systems](https://reader033.vdocuments.us/reader033/viewer/2022060107/55496169b4c905f74e8b5ac3/html5/thumbnails/2.jpg)
Nagios
• Open source project
• Available since 1999 (Netsaint)
• Pretty much the standard
• Interface a bit old (frames!)
![Page 3: Using Nagios to monitor your WO systems](https://reader033.vdocuments.us/reader033/viewer/2022060107/55496169b4c905f74e8b5ac3/html5/thumbnails/3.jpg)
Installation
• CentOS/Amazon Linux: yum install nagios nagios-plugins-all
• Ubuntu: apt-get install nagios3
• Mac OS X: port install nagios
![Page 4: Using Nagios to monitor your WO systems](https://reader033.vdocuments.us/reader033/viewer/2022060107/55496169b4c905f74e8b5ac3/html5/thumbnails/4.jpg)
Configuration directory
• CentOS/Amazon Linux: /etc/nagios/etc/httpd/conf.d/nagios.conf
• Ubuntu: /etc/nagios3
• Mac OS X: /opt/local/etc/nagios
![Page 5: Using Nagios to monitor your WO systems](https://reader033.vdocuments.us/reader033/viewer/2022060107/55496169b4c905f74e8b5ac3/html5/thumbnails/5.jpg)
NRPE• Agent to check local services
• CentOS/AmazonLinux: Installation: yum install nrpe Configuration: /etc/nagios/nrpe.cfg
• Ubuntu: apt-get install nagios-nrpe-server Configuration: /etc/nagios/nrpe.cfg
• Mac OS X: port install nrpe Configuration: /opt/local/etc/nrpe.cfg.sample
![Page 6: Using Nagios to monitor your WO systems](https://reader033.vdocuments.us/reader033/viewer/2022060107/55496169b4c905f74e8b5ac3/html5/thumbnails/6.jpg)
Basic monitoring
![Page 7: Using Nagios to monitor your WO systems](https://reader033.vdocuments.us/reader033/viewer/2022060107/55496169b4c905f74e8b5ac3/html5/thumbnails/7.jpg)
HTTP
• check_http plugin
• Can check port, string in respond, path, etc.
• Can do POST request with content
• Can do GET, HEAD, OPTIONS, TRACE, DELETE requests
• Can do BASIC auth
![Page 8: Using Nagios to monitor your WO systems](https://reader033.vdocuments.us/reader033/viewer/2022060107/55496169b4c905f74e8b5ac3/html5/thumbnails/8.jpg)
HTTPS
• Same plugin as HTTP
• Can check date of certificate
![Page 9: Using Nagios to monitor your WO systems](https://reader033.vdocuments.us/reader033/viewer/2022060107/55496169b4c905f74e8b5ac3/html5/thumbnails/9.jpg)
Using Selenium WebDriver
• Need more complex HTTP check?
• Selenium WebDriver + Google Chrome + script to the rescue!
![Page 10: Using Nagios to monitor your WO systems](https://reader033.vdocuments.us/reader033/viewer/2022060107/55496169b4c905f74e8b5ac3/html5/thumbnails/10.jpg)
MySQL
• Two plugins: check_mysql and check_mysql_query
• check_mysql can check status of slave
• check_mysql_query will check result of query against warning/critical levels
![Page 11: Using Nagios to monitor your WO systems](https://reader033.vdocuments.us/reader033/viewer/2022060107/55496169b4c905f74e8b5ac3/html5/thumbnails/11.jpg)
PostgreSQL
• check_pgsql
• Will check if specified database is active and running
![Page 12: Using Nagios to monitor your WO systems](https://reader033.vdocuments.us/reader033/viewer/2022060107/55496169b4c905f74e8b5ac3/html5/thumbnails/12.jpg)
Disk
• You don’t want to run out of disk space!
• check_disk plugin
• Check available disk space of specific file system or path
![Page 13: Using Nagios to monitor your WO systems](https://reader033.vdocuments.us/reader033/viewer/2022060107/55496169b4c905f74e8b5ac3/html5/thumbnails/13.jpg)
JMX
• Check the heap space of your WO apps!
• check_jmx
• http://exchange.nagios.org/directory/Plugins/Java-Applications-and-Servers/check_jmx/details
![Page 14: Using Nagios to monitor your WO systems](https://reader033.vdocuments.us/reader033/viewer/2022060107/55496169b4c905f74e8b5ac3/html5/thumbnails/14.jpg)
check_woapp.py
• Nagios plugin (Python) that checks numerous stuff in Monitor
• State
• Number of deaths
• Is refusing new sessions
• Is auto recover on?
• # of active sessions
![Page 15: Using Nagios to monitor your WO systems](https://reader033.vdocuments.us/reader033/viewer/2022060107/55496169b4c905f74e8b5ac3/html5/thumbnails/15.jpg)
Plugin development
• Can be anything! Bash, Python, Perl, Java, etc.
• Only need to send proper exit() signal
• Better to send performance data too
![Page 16: Using Nagios to monitor your WO systems](https://reader033.vdocuments.us/reader033/viewer/2022060107/55496169b4c905f74e8b5ac3/html5/thumbnails/16.jpg)
Other useful plugins
• check_load
• check_by_ssh
• check_dns
• check_file_age
• check_tcp/check_udp
• check_linux_raid
• check_ntp_time
• check_swap
![Page 17: Using Nagios to monitor your WO systems](https://reader033.vdocuments.us/reader033/viewer/2022060107/55496169b4c905f74e8b5ac3/html5/thumbnails/17.jpg)
Graphing
• Not built-in
• Numerous third-party
• I use PNP4Nagios
![Page 18: Using Nagios to monitor your WO systems](https://reader033.vdocuments.us/reader033/viewer/2022060107/55496169b4c905f74e8b5ac3/html5/thumbnails/18.jpg)
Actions
• Can launch actions (scripts) based on events
• Nagios call this « event handlers »
• Examples:
• Start new instance if one is down
• Start new VM if host memory is low
![Page 19: Using Nagios to monitor your WO systems](https://reader033.vdocuments.us/reader033/viewer/2022060107/55496169b4c905f74e8b5ac3/html5/thumbnails/19.jpg)
Demo
![Page 20: Using Nagios to monitor your WO systems](https://reader033.vdocuments.us/reader033/viewer/2022060107/55496169b4c905f74e8b5ac3/html5/thumbnails/20.jpg)
Next: Logstash
![Page 21: Using Nagios to monitor your WO systems](https://reader033.vdocuments.us/reader033/viewer/2022060107/55496169b4c905f74e8b5ac3/html5/thumbnails/21.jpg)
Q&A