Video summary
Nagios Full Course | That will actually makes your life better | Tech Arkit
Main summary
Key takeaways
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/nanofor editing config files.
Installation and post-install tasks (high-level steps)
- 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 withhtpasswd.
- Create Nagios user/group (e.g.,
- Install Nagios plugins
- Download plugins tar, compile,
make installinto/usr/local/nagios/libexec.
- Download plugins tar, compile,
- 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
- Main config:
- 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.
- Create contacts/contact groups → host templates/service templates → common commands → timeperiods → directories for object files and include them in
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.
- Generate a self-signed or CA-signed cert and configure Apache’s SSL settings (e.g.,
- Web users and permissions
- Create
htpasswdentries for read-only and admin users. - Use
cgi.cfgauthorization macros to grant read vs write/command permissions.
- Create
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).
- Install and configure NSClient++, open port (commonly 12489), and use
- NRPE (Linux)
- Install
nrpeandnagios-pluginson Linux clients, configure allowed hosts and commands, and usecheck_nrpefrom the Nagios server.
- Install
- NCPA (Nagios Cross-Platform Agent)
- Install on Windows/Linux, configure token, and use
check_ncpa.pyon the Nagios server.
- Install on Windows/Linux, configure token, and use
- SNMP (agentless)
- Install & configure SNMP (
net-snmp) on Windows and Linux; usecheck_snmpand custom Perl/PHP plugins for network devices, storage, AD, etc. - Examples include SNMP MIB-based checks for storage, interfaces, and processes.
- Install & configure SNMP (
- 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-tplwith properties:check_interval,retry_interval,max_check_attempts,notification_interval,contact_groups,icon_image,action_urlfor graphs.
- Host/service templates like
- Contacts and contact groups
- Define notification preferences (which states to alert) and notification periods (day shift vs 24x7).
- Commands
commands.cfgcontains 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.
- Duplicate definitions, spelling mistakes in object names, missing command definitions, incorrect include paths in
- 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_httpfor 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.pland 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_attemptsand retry intervals to convert soft→hard states to prevent false positives.
- How Nagios uses
- Common config fixes
- Include path errors in
nagios.cfg, incorrect object names, duplicate definitions, missing commands.
- Include path errors in
- 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)
- Monitoring basics and theory (what/why/how)
- Lab setup: VM creation (VMware) with CentOS, Windows, Ubuntu
- Install Nagios Core from source on CentOS (user/group, make install steps)
- Install Nagios plugins (compile and install)
- Configure basic Nagios objects: templates, contacts, commands, timeperiods, host/service definitions
- Install pnp4nagios (RRD) and integrate graphs
- Install and configure NagVis dashboards
- Install ndoutils /
ndo2dband configure MariaDB for historical data - Configure Apache SSL for Nagios web UI and create web users (read/admin)
- Add Linux hosts via NRPE and demonstrate NRPE config on clients
- Add Windows hosts via NSClient++ (install/config) and configure checks
- Install and configure NCPA agent (Windows/Linux) and check with
check_ncpa.py - Install & configure SNMP (Windows/Linux), install SNMP plugins, define SNMP commands and services
- Website monitoring and content checks with
check_http - SSL certificate expiration monitoring plugin usage
- HTML email notifications (install notification Perl scripts and configure notification commands)
- MySQL/MariaDB monitoring with check_mysql plugins and required Perl modules
- PagerDuty integration (create service/integration key, install pd agent, configure Nagios notification command)
- 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.oand broker config files included innagios.cfg - NRPE client config:
/etc/nagios/nrpe.cfg - NSClient++ (Windows):
nsclient.iniunderProgram Files\NSClient++ - NCPA config:
/usr/local/ncpa/etc/ncpa.cfg(token/community string) - Common plugin wrappers in
commands.cfguse 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.
Translate summary in another language
Ask questions to this video
Chat for follow-up questions, clarifications, and source-backed answers.