Video summary

Nagios Full Course | That will actually makes your life better | Tech Arkit

Main summary

Key takeaways

Technology

Overview

  • Hands-on, end-to-end practical course/demonstration on Nagios Core (open-source) aimed at infrastructure/operations admins and DevOps engineers. Presenter: Ravi (Tech Arkit).

  • Topics covered: monitoring theory, Nagios architecture/terminology, installing/configuring Nagios Core from source, agents and agentless methods, graphing/visualization, alerting (email/SMS/HTML), incident integration (PagerDuty), and common real-world troubleshooting.

Key technological concepts explained

  • Why monitor
    • Problem detection (before/when downtime occurs), troubleshooting, reporting/improvement, capacity planning (CPU/memory/disk trends).
  • What to monitor
    • Business processes, workload, service availability, hardware resources — focus on important services to avoid alert overload.
  • Nagios terminology and architecture
    • Plugins, hosts, services, contacts, contact groups, host & service templates, host/service groups, timeperiods, commands, event handlers, flapping detection, performance data.
  • Check types
    • Active checks: initiated by the Nagios server (executes plugin/NRPE/NSClient requests).
    • Passive checks: external apps send results to Nagios (useful with limited connectivity).
  • State model
    • Soft vs hard states, retry/redrive intervals, maximum attempts; how Nagios avoids false positives via soft→hard transitions and notification rules.
  • Scheduler and performance
    • Parallelized checks and scheduler behavior; performance data stored in RRD for graphing.
  • Nagios Core vs Nagios XI
    • Core = free/open source with manual configuration. XI = commercial with easier GUI, built-in graphs/dashboards, and support.

Lab prerequisites and environment

  • Basic Linux command line and networking knowledge; familiarity with SSH and package management helpful.
  • Suggested lab VMs/ISOs: CentOS 7/8, Ubuntu, Windows Server (2008/2012/2019), Windows 10.
  • Virtualization/container options: VMware Workstation (used in the course), VirtualBox, Docker, Kubernetes, AWS/Azure.
  • Text editor: vim/nano for editing config files.

Installation and post-install tasks (high-level steps)

  1. Build/install Nagios Core from source
    • Create Nagios user/group (e.g., nagios, nagcmd).
    • Typical build steps: ./configure --with-nagios-user=... --with-nagios-group=..., make all, make install, make install-init, make install-config, make install-webconf.
    • Install and configure Apache (httpd) and create Nagios web admin user with htpasswd.
  2. Install Nagios plugins
    • Download plugins tar, compile, make install into /usr/local/nagios/libexec.
  3. Key config files & layout
    • Main config: /usr/local/nagios/etc/nagios.cfg
    • Object files: /usr/local/nagios/etc/objects/ (templates.cfg, commands.cfg, contacts.cfg, timeperiods.cfg, plus host/service definitions)
    • Plugins: /usr/local/nagios/libexec
  4. Recommended post-install sequencing
    • Create contacts/contact groups → host templates/service templates → common commands → timeperiods → directories for object files and include them in nagios.cfg → add hosts/services.
    • Integrate add-ons (pnp4nagios, ndoutils, NagVis) after basic setup.

Graphing and visualization

  • pnp4nagios (RRDTool-based) to enable graphs inside Nagios Core (install rrdtool, compile and install pnp4nagios, set up performance data processing).
  • NagVis for dashboards and network maps.
  • ndoutils / ndo2db + MariaDB: use the broker module to push Nagios status/perf data into a DB for visualization and queries (used by NagVis and historical reporting).

Security and web UI

  • SSL for Nagios web UI
    • Generate a self-signed or CA-signed cert and configure Apache’s SSL settings (e.g., /etc/httpd/conf.d/ssl.conf) and redirect to HTTPS.
  • Web users and permissions
    • Create htpasswd entries for read-only and admin users.
    • Use cgi.cfg authorization macros to grant read vs write/command permissions.

Agents and agentless monitoring

  • NSClient++ (Windows)
    • Install and configure NSClient++, open port (commonly 12489), and use check_nt/check_nt++ on Nagios for Windows metrics (CPU, memory, disk, services).
  • NRPE (Linux)
    • Install nrpe and nagios-plugins on Linux clients, configure allowed hosts and commands, and use check_nrpe from the Nagios server.
  • NCPA (Nagios Cross-Platform Agent)
    • Install on Windows/Linux, configure token, and use check_ncpa.py on the Nagios server.
  • SNMP (agentless)
    • Install & configure SNMP (net-snmp) on Windows and Linux; use check_snmp and custom Perl/PHP plugins for network devices, storage, AD, etc.
    • Examples include SNMP MIB-based checks for storage, interfaces, and processes.
  • Example plugins
    • check_ping, check_http (availability and content), check_ssl_cert (SSL expiry), check_mysql/check_mysqld.pl (MySQL/MariaDB), check_snmp*, check_nrpe, check_nt, check_ncpa.py.

Configuration examples & common edits

  • Templates
    • Host/service templates like linux-tpl, windows-tpl, service-tpl with properties: check_interval, retry_interval, max_check_attempts, notification_interval, contact_groups, icon_image, action_url for graphs.
  • Contacts and contact groups
    • Define notification preferences (which states to alert) and notification periods (day shift vs 24x7).
  • Commands
    • commands.cfg contains wrapper commands that call plugins with macro arguments ($HOSTADDRESS$, $ARG1$, $ARG2$, etc.).
  • Common errors and fixes
    • Duplicate definitions, spelling mistakes in object names, missing command definitions, incorrect include paths in nagios.cfg.
  • SELinux and firewall
    • SELinux or firewall rules can block agent communication—adjust or disable in the lab as needed and open HTTP/HTTPS, NRPE, NCPA, SNMP ports.

Monitoring use cases and plugins demonstrated

  • Host/service checks: ping, disk/partition space, memory, load, swap, processes, service state, AD/LDAP checks.
  • Windows: NSClient++ checks for CPU/memory/disk/service/AD; NRPE where applicable.
  • Linux: NRPE, NCPA, SNMP checks for appliances.
  • Website monitoring: check_http for availability, follow redirects, content checks, and SSL certificate validity (example thresholds: warn <30 days, critical <15 days).
  • Database monitoring: MySQL/MariaDB with check_mysql/check_mysqld.pl and required Perl DBI/DBD modules; create a monitoring DB user and grant appropriate privileges.
  • Notifications
    • Default text-based emails vs HTML-formatted emails — the course shows external notification scripts (Perl) for better formatting.
    • SMS is not built into Core; integrate third-party gateways if needed.

PagerDuty integration

  • Setup
    • Create PagerDuty account/service and obtain an integration key (API key) per service.
    • Install and configure PagerDuty agent (pd-agent) and the Nagios notification command/plugin.
    • Add PagerDuty notifications to contacts/contact groups.
  • Demonstrated workflow
    • Nagios events create PagerDuty incidents, call on-call personnel, allow acknowledgment and adding comments via PagerDuty.

Troubleshooting tips covered

  • State conversion
    • How Nagios uses max_check_attempts and retry intervals to convert soft→hard states to prevent false positives.
  • Common config fixes
    • Include path errors in nagios.cfg, incorrect object names, duplicate definitions, missing commands.
  • Permission and service issues
    • Plugin permissions (ownership & executable bits), Apache config changes, and the need to restart Nagios/HTTPD after config modifications.
  • Dependency checks
    • Ensure required Perl/Python packages are installed for certain plugins (DBI, DBD::mysql, GD, LWP, etc.).
  • SELinux and firewall
    • These often block agent communication—adjust or disable in lab environments.

Practical tutorial modules (explicit step list)

  1. Monitoring basics and theory (what/why/how)
  2. Lab setup: VM creation (VMware) with CentOS, Windows, Ubuntu
  3. Install Nagios Core from source on CentOS (user/group, make install steps)
  4. Install Nagios plugins (compile and install)
  5. Configure basic Nagios objects: templates, contacts, commands, timeperiods, host/service definitions
  6. Install pnp4nagios (RRD) and integrate graphs
  7. Install and configure NagVis dashboards
  8. Install ndoutils / ndo2db and configure MariaDB for historical data
  9. Configure Apache SSL for Nagios web UI and create web users (read/admin)
  10. Add Linux hosts via NRPE and demonstrate NRPE config on clients
  11. Add Windows hosts via NSClient++ (install/config) and configure checks
  12. Install and configure NCPA agent (Windows/Linux) and check with check_ncpa.py
  13. Install & configure SNMP (Windows/Linux), install SNMP plugins, define SNMP commands and services
  14. Website monitoring and content checks with check_http
  15. SSL certificate expiration monitoring plugin usage
  16. HTML email notifications (install notification Perl scripts and configure notification commands)
  17. MySQL/MariaDB monitoring with check_mysql plugins and required Perl modules
  18. PagerDuty integration (create service/integration key, install pd agent, configure Nagios notification command)
  19. Common troubleshooting examples and fixes during the labs

Common paths, files, and commands (quick reference)

  • Nagios config: /usr/local/nagios/etc/nagios.cfg
  • Objects directory: /usr/local/nagios/etc/objects/ (templates.cfg, commands.cfg, contacts.cfg, timeperiods.cfg)
  • Plugins: /usr/local/nagios/libexec/ (check_nrpe, check_nt, check_http, check_snmp, check_mysql.pl, check_ncpa.py, custom plugins)
  • Web config and SSL: /etc/httpd/conf.d/ssl.conf; certs: /etc/pki/tls/certs/server.crt, private: /etc/pki/tls/private/server.key
  • pnp4nagios install dir: /usr/local/pnp4nagios (scripts under /usr/local/pnp4nagios/share)
  • ndoutils broker config: referenced via broker_module=/path/to/ndomod.o and broker config files included in nagios.cfg
  • NRPE client config: /etc/nagios/nrpe.cfg
  • NSClient++ (Windows): nsclient.ini under Program Files\NSClient++
  • NCPA config: /usr/local/ncpa/etc/ncpa.cfg (token/community string)
  • Common plugin wrappers in commands.cfg use macros like $ARG1$, $HOSTADDRESS$, $SERVICEDESC$

Main speakers and sources

  • Presenter: Ravi — Tech Arkit (Tech Arkit YouTube channel).
  • Tools and third-party components referenced:
    • Nagios Core and Nagios XI
    • NRPE, NSClient++, NCPA agents
    • pnp4nagios (RRD graphs)
    • NagVis (visual dashboards)
    • ndoutils / ndo2db (Nagios → DB broker)
    • MariaDB / MySQL
    • SNMP (net-snmp)
    • PagerDuty (incident management)
    • Various community plugins and scripts (e.g., check_ssl_cert, check_mysqld.pl, SNMP plugins)

Additional resources (optional)

Short step-by-step checklists for specific modules are available, for example:

  • “Install Nagios Core from source”
  • “Add a Windows host with NSClient++”
  • “Integrate PagerDuty”

These checklists can include exact commands and file snippets used in the course.

Rate this summary

Your feedback will help improve summaries.

Improve this summary

Reprocess with a stronger model when the summary feels incomplete or inaccurate.

Pro

Translate summary in another language

Pro

Ask questions to this video

Chat for follow-up questions, clarifications, and source-backed answers.

Coming soon

Share this summary

Original video