Eric Mislivec - Getting Started With Nagios Core
Eric Mislivec - Getting Started With Nagios Core
Eric Mislivec - Getting Started With Nagios Core
Eric Mislivec
[email protected]
The Plan
●
What is Nagios Core?
●
Features & Benefits
●
Architecture
●
Installation & Configuration
●
Resources & Support
●
Get Involved
●
Questions
What is...
●
The Standard in Open Source IT Monitoring
●
15+ years
●
A monitoring and alerting engine
●
Why we're here
Comprehensive Monitoring
●
A few 'Nagiosable' things
– System metrics
– Service status
– Applications
– Network devices
●
???
– “There's a check for that.”
●
Network / logical hierarchy
Visibility
Alerting & Awareness
●
Multiple methods
●
email, SMS, ...
●
Customizable
●
Targetable
●
Escalations for multi-user setups
●
Schedule downtime, avoid false alerts
Problem Remediation
●
Acknowledge problems online
●
Event handlers for automation
Reporting
Extendable Architecture
●
List of 'objects' to monitor
●
Schedule of things to do
●
Run checks, other commands
●
Other work as requested
Objects
●
Hosts & Host Groups
●
Services & Service Groups
●
Contacts & Contact Groups
●
Commands
●
Time Periods
●
Notification Escalations
●
Notification and Execution Dependencies
Checks
●
Active
●
Initiated by Nagios process
●
Regularly scheduled
●
On demand
●
Passive
●
Initiated externally
●
Results sent to Core
Formats & APIs
●
Configurable commands
●
Plugin / check result format
●
Performance data
●
External commands
●
Query handler
●
Check results spool
●
CGIs, now with JSON
NEBs
●
Nagios Event Broker Modules
●
Loaded into Core on startup
●
Hook into key steps
●
Can override or cancel some
●
Examples
●
Distribute checks: mod_gearman
●
Export data: NDOUtils
That's Nice, but...
●
UNIX OS: Linux, BSD, OS X, Solaris, AIX, …
●
C compiler & development tools
●
Web server, PHP, gd (CGIs)
●
Network access
Installation - 'Hard' Requirements
General Monitoring
Minimum Recommended
Processor 1 GHz 2 GHz+
Memory 512 MB 1 GB+
Storage 512 MB 2 GB+
# Open up ports for HTTP. We use -I to insert the new rules at the head of
# the INPUT chain; -A adds them at the tail, possibly after a REJECT rule.
iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
service iptables save
●
/usr/local/nagios/
●
bin/ - Nagios Core binaries
●
etc/ - Configuration files
●
libexec/ - Plugins, event handlers, cmds
●
sbin/ - CGI binaries
●
share/ - Web UI files
●
var/ - Runtime files, data, logs
etc/nagios.cfg
●
General program settings
●
File paths
●
NEBs to load
●
Loading other configuration
# You can specify individual config files:
cfg_file=/usr/local/nagios/etc/objects/commands.cfg
cfg_file=/usr/local/nagios/etc/objects/contacts.cfg
cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg
cfg_file=/usr/local/nagios/etc/objects/templates.cfg
●
Basic format
define someobjecttype {
some_variable Some text
another_variable 1234
}
A Partial Template Example
●
Template
define host {
check_command check-host-alive
notification_options d,u,r
max_check_attempts 5
name host_template
register 0
}
●
Host
define host {
use host_template
host_name example-host
alias Partial Host Example
host_address 127.0.0.1
}
A Real Host Template
define host {
name generic-host ; Name of this host template
notifications_enabled 1 ; Host notifications are enabled
event_handler_enabled 1 ; Host event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Keep status info across restarts
retain_nonstatus_information 1 ; Keep non-status info across restarts
notification_period 24x7 ; Send host notifications at any time
register 0 ; Don't register, this is a template!
}
More configuration
●
Where to from here?
●
Sample config: etc/
●
Experiment
●
Core Manual
nagios.sourceforge.net/docs/nagioscore/4/
en/toc.html
Nagios Exchange
exchange.nagios.org
Nagios Library
library.nagios.com
General Support Forum
support.nagios.com/forum
Professional Support Contracts
www.nagios.com/services/support
Additional Solutions & Services
Preconfigured VMs
www.nagios.org/download/core
Training
go.nagios.org/training
Certification
www.nagios.com/services/certification
Nagios XI
nagios.com/products/nagiosxi
Get Involved
●
Learn, share and help on the forums
support.nagios.com/forum
●
Share on Exchange
exchange.nagios.org
●
We're on GitHub
github.com/NagiosEnterprises
github.com/NagiosEnterprises/nagioscore
Summary
●
Enables comprehensive monitoring
●
Awarness, visibility, resolution, reporting
●
Extensible architecture
●
Installation
●
Introduction to configuration concepts
●
Where to find more resources
●
How to contribute
Questions?
Thank You
Eric Mislivec
[email protected]