SlideShare a Scribd company logo
Monitoring your system using
Nagios and Python plugins
By,
Darshan N
Agenda
● Why monitoring?
● Introduction to nagios
● Architecture of nagios
● Writing a monitoring plugin in python
● Examples of plugin
● Demo
Why monitoring ?
● Monitoring a system is important as it helps you
detect problems in the system before hand.
● You can take corrective measures to resolve
the issues.
● It gives us idea of resource utilization in the
system.
● Scale your system based on the utilization.
● Many monitoring softwares are avlilable.
Introduction to Nagios
● Nagios is open source monitoring software licensed
under the GNU GPL V2.
● Nagios offers monitoring and alerting for servers,
switches, applications, and services.
● Monitoring via remotely run scripts via Nagios
Remote Plugin Executor
● A simple plugin design that allows users to easily
develop their own service checks depending on
needs, by using their tools of choice (shell scripts,
Python, C++, Perl, Ruby, PHP, C#, etc.)
● Graphing with the help of pnp4nagios
Architecture of Nagios
Writing a nagios plugin in python
● Plugin Output
– Output to be printed to STDOUT that tells if the service is
working or why it is failing.
– Try to keep the output short - probably less that 80
characters
– SERVICE STATUS: First line of output | performance
data
● Performance data: Nagios will consider the parts
following a "|" as the performance data
● Performance data format:
'label'=value[UOM];[warn];[crit];[min];[max]
Writing a nagios plugin in python
● Nagios server detects the service status by the
exit code of the plugin
● Nagios plugin possible Exit Codes
Exit Code Status
0 OK
1 WARNING
2 CRITICAL
3 UNKNOWN
Writing a nagios plugin in python
● Plugin Options
-V version (--version)
-h help (--help)
-t timeout (--timeout)
-w warning threshold (--warning)
-c critical threshold (--critical)
Example of plugin
● Writing a sample nagios plugin in python.
● Pluging our sample plugin to nagios monitoring
system.
Demo
● Using python plugins to monitor glusterfs (a
distributed file system)
Thank you

More Related Content

PPT
Nagios
PPTX
Nagios Conference 2014 - Tanja Lewit - Nagios and Kentix System Partners - Cr...
PPTX
Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...
ODP
Nagios Conference 2014 - Shamas Demoret - An Overview of Nagios Solutions
PPTX
Zabbix
ODP
Nagios Conference 2013 - Eric Stanley - Whats New Core 4
PPTX
Nagios Conference 2014 - Jim Prins - Passive Monitoring with Nagios
PDF
Cloud Monitoring tool Grafana
Nagios
Nagios Conference 2014 - Tanja Lewit - Nagios and Kentix System Partners - Cr...
Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...
Nagios Conference 2014 - Shamas Demoret - An Overview of Nagios Solutions
Zabbix
Nagios Conference 2013 - Eric Stanley - Whats New Core 4
Nagios Conference 2014 - Jim Prins - Passive Monitoring with Nagios
Cloud Monitoring tool Grafana

What's hot (20)

ODP
Nagios Conference 2014 - Luke Groschen - Using Nagios Network Analyzer and NS...
ODP
Nagios Conference 2011 - Ethan Galstad - Keynote Presentation
PDF
Nagios Conference 2012 - Scott Wilkerson - Passive Monitoring Solutions For R...
PPTX
Logging intro
PPTX
High Availability in Neutron
PPTX
Network Maps & Reporting [Free OpManager Training - Part 5]
ODP
Nginx monitoring with graphite
PDF
Remote Access VPNs Part 2 - pfSense Hangout October 2015
PDF
What's new and what's next in Rudder
PDF
NGINX ADC: Basics and Best Practices
PDF
Syslog Centralization Logging with Windows ~ A techXpress Guide
PDF
Archivematica Technical Training Diagnostics Guide (September 2018)
PDF
Site-to-Site VPNs - pfSense Hangout November 2015
PPTX
Automation tools: making things go... (March 2019)
PPT
Nagios En
PDF
Advanced OpenVPN Concepts - pfSense Hangout September 2014
PDF
Introduction to the Archivematica API (September 2018)
PDF
5 initial access to palo alto using cli
PDF
OpenVPN as a WAN - pfSense Hangout October 2016
PDF
Influx/Days 2017 San Francisco | Dan Cech
Nagios Conference 2014 - Luke Groschen - Using Nagios Network Analyzer and NS...
Nagios Conference 2011 - Ethan Galstad - Keynote Presentation
Nagios Conference 2012 - Scott Wilkerson - Passive Monitoring Solutions For R...
Logging intro
High Availability in Neutron
Network Maps & Reporting [Free OpManager Training - Part 5]
Nginx monitoring with graphite
Remote Access VPNs Part 2 - pfSense Hangout October 2015
What's new and what's next in Rudder
NGINX ADC: Basics and Best Practices
Syslog Centralization Logging with Windows ~ A techXpress Guide
Archivematica Technical Training Diagnostics Guide (September 2018)
Site-to-Site VPNs - pfSense Hangout November 2015
Automation tools: making things go... (March 2019)
Nagios En
Advanced OpenVPN Concepts - pfSense Hangout September 2014
Introduction to the Archivematica API (September 2018)
5 initial access to palo alto using cli
OpenVPN as a WAN - pfSense Hangout October 2016
Influx/Days 2017 San Francisco | Dan Cech
Ad

Similar to Nagios monitoring with_python_plugin (20)

ODP
Writing Nagios Plugins in Python
PDF
Nagios 3
PDF
Writing nagios plugins in perl
PDF
Janice Singh - Writing Custom Nagios Plugins
PDF
Nagios 3
PDF
OSMC 2008 | An Active Check on the Status of the Nagios Plugins PART 2 by Ton...
PDF
Using Nagios to monitor your WO systems
PDF
Lesson_08_Continuous_Monitoring.pdf
PDF
Learning Nagios module 1
PDF
Stop using Nagios (so it can die peacefully)
PPTX
Functionality, security and performance monitoring of web assets (e.g. Joomla...
ODP
Monitoring at/with SUSE 2015
ODP
Nagios Conference 2014 - Eric Mislivec - Getting Started With Nagios Core
PPTX
Nagios Conference 2011 - Nate Broderick - Nagios XI Large Implementation Tips...
PDF
Install nagios
PDF
Install nagios
PDF
Install nagios
PPTX
Writing plugins for Nagios and Opsview - CAPSiDE Tech Talks
PDF
Nagios Conference 2007 | State of the Plugins by Ton Voon
ODP
Nagios Conference 2011 - William Leibzon - Nagios In Cloud Computing Environm...
Writing Nagios Plugins in Python
Nagios 3
Writing nagios plugins in perl
Janice Singh - Writing Custom Nagios Plugins
Nagios 3
OSMC 2008 | An Active Check on the Status of the Nagios Plugins PART 2 by Ton...
Using Nagios to monitor your WO systems
Lesson_08_Continuous_Monitoring.pdf
Learning Nagios module 1
Stop using Nagios (so it can die peacefully)
Functionality, security and performance monitoring of web assets (e.g. Joomla...
Monitoring at/with SUSE 2015
Nagios Conference 2014 - Eric Mislivec - Getting Started With Nagios Core
Nagios Conference 2011 - Nate Broderick - Nagios XI Large Implementation Tips...
Install nagios
Install nagios
Install nagios
Writing plugins for Nagios and Opsview - CAPSiDE Tech Talks
Nagios Conference 2007 | State of the Plugins by Ton Voon
Nagios Conference 2011 - William Leibzon - Nagios In Cloud Computing Environm...
Ad

Recently uploaded (20)

PDF
22EC502-MICROCONTROLLER AND INTERFACING-8051 MICROCONTROLLER.pdf
PDF
August 2025 - Top 10 Read Articles in Network Security & Its Applications
PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PDF
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
PDF
Accra-Kumasi Expressway - Prefeasibility Report Volume 1 of 7.11.2018.pdf
PDF
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
PDF
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
PDF
EXPLORING LEARNING ENGAGEMENT FACTORS INFLUENCING BEHAVIORAL, COGNITIVE, AND ...
PPTX
Nature of X-rays, X- Ray Equipment, Fluoroscopy
PDF
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
PPTX
Information Storage and Retrieval Techniques Unit III
PPTX
Management Information system : MIS-e-Business Systems.pptx
PDF
A SYSTEMATIC REVIEW OF APPLICATIONS IN FRAUD DETECTION
PDF
Influence of Green Infrastructure on Residents’ Endorsement of the New Ecolog...
PPTX
Safety Seminar civil to be ensured for safe working.
PDF
COURSE DESCRIPTOR OF SURVEYING R24 SYLLABUS
PPTX
"Array and Linked List in Data Structures with Types, Operations, Implementat...
PDF
SMART SIGNAL TIMING FOR URBAN INTERSECTIONS USING REAL-TIME VEHICLE DETECTI...
PDF
Categorization of Factors Affecting Classification Algorithms Selection
PDF
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
22EC502-MICROCONTROLLER AND INTERFACING-8051 MICROCONTROLLER.pdf
August 2025 - Top 10 Read Articles in Network Security & Its Applications
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
Accra-Kumasi Expressway - Prefeasibility Report Volume 1 of 7.11.2018.pdf
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
EXPLORING LEARNING ENGAGEMENT FACTORS INFLUENCING BEHAVIORAL, COGNITIVE, AND ...
Nature of X-rays, X- Ray Equipment, Fluoroscopy
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
Information Storage and Retrieval Techniques Unit III
Management Information system : MIS-e-Business Systems.pptx
A SYSTEMATIC REVIEW OF APPLICATIONS IN FRAUD DETECTION
Influence of Green Infrastructure on Residents’ Endorsement of the New Ecolog...
Safety Seminar civil to be ensured for safe working.
COURSE DESCRIPTOR OF SURVEYING R24 SYLLABUS
"Array and Linked List in Data Structures with Types, Operations, Implementat...
SMART SIGNAL TIMING FOR URBAN INTERSECTIONS USING REAL-TIME VEHICLE DETECTI...
Categorization of Factors Affecting Classification Algorithms Selection
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT

Nagios monitoring with_python_plugin

  • 1. Monitoring your system using Nagios and Python plugins By, Darshan N
  • 2. Agenda ● Why monitoring? ● Introduction to nagios ● Architecture of nagios ● Writing a monitoring plugin in python ● Examples of plugin ● Demo
  • 3. Why monitoring ? ● Monitoring a system is important as it helps you detect problems in the system before hand. ● You can take corrective measures to resolve the issues. ● It gives us idea of resource utilization in the system. ● Scale your system based on the utilization. ● Many monitoring softwares are avlilable.
  • 4. Introduction to Nagios ● Nagios is open source monitoring software licensed under the GNU GPL V2. ● Nagios offers monitoring and alerting for servers, switches, applications, and services. ● Monitoring via remotely run scripts via Nagios Remote Plugin Executor ● A simple plugin design that allows users to easily develop their own service checks depending on needs, by using their tools of choice (shell scripts, Python, C++, Perl, Ruby, PHP, C#, etc.) ● Graphing with the help of pnp4nagios
  • 6. Writing a nagios plugin in python ● Plugin Output – Output to be printed to STDOUT that tells if the service is working or why it is failing. – Try to keep the output short - probably less that 80 characters – SERVICE STATUS: First line of output | performance data ● Performance data: Nagios will consider the parts following a "|" as the performance data ● Performance data format: 'label'=value[UOM];[warn];[crit];[min];[max]
  • 7. Writing a nagios plugin in python ● Nagios server detects the service status by the exit code of the plugin ● Nagios plugin possible Exit Codes Exit Code Status 0 OK 1 WARNING 2 CRITICAL 3 UNKNOWN
  • 8. Writing a nagios plugin in python ● Plugin Options -V version (--version) -h help (--help) -t timeout (--timeout) -w warning threshold (--warning) -c critical threshold (--critical)
  • 9. Example of plugin ● Writing a sample nagios plugin in python. ● Pluging our sample plugin to nagios monitoring system.
  • 10. Demo ● Using python plugins to monitor glusterfs (a distributed file system)