Eric Stanley's presentation on Whats New Core 4.
The presentation was given during the Nagios World Conference North America held Sept 20-Oct 2nd, 2013 in Saint Paul, MN. For more information on the conference (including photos and videos), visit: http://go.nagios.com/nwcna
2. 2
Nagios Core 4 - Overview
Released Sep 20, 2013
In development since about June, 2012
Primary developer – Andreas Ericsson
3. 3
Nagios Core 4 - Performance
Core Workers – lightweight processes which
perform simple tasks
Configuration Verification – each configuration
item only checked once
Event Queue – Insertions now O(log n)
Macro Resolution
Sorted on start-up
$ARGx$, $USERx$, $HOSTADDRESS$
4. 4
Nagios Core 4 – Query Handler
External interface to main Nagios Core process
Uses Unix-domain socket
/usr/local/nagios/var/rw/nagios.qh
Simple protocol
5. 5
Nagios Core 4 – Query Handler
core - provides Nagios Core management and
information
wproc - provides worker process registration,
management and information
nerd - provides a subscription service to the
Nagios Event Radio Dispatcher (NERD)
help - provides help for the query handler
echo - implements a basic query handler that
simply echoes back the queries sent to it
7. 7
Nagios Core 4 – Core Workers
Nagios Core 3
Entire process forked twice for each check
Check results written to and read from disk
8. 8
Nagios Core 4 – Core Workers
Nagios Core 4
Core workers forked at Nagios start
Core workers only contain code needed to
perform their tasks
Only need to fork for actual check when check
is complex
Check results passed to main Nagios process in
memory
9. 9
Nagios Core 4 – Core Workers
Workers register using query handler interface
Workers can register for specific checks
Specialized workers
Future possibilities
Remote workers
Workers for specific hosts
10. 10
Nagios Core 4 – Object Changes
Hourly Value (hosts and services)
Intended to convey value of the host or service
to the organization
Integer value
Example: development server would have low
value but e-commerce web server would have
high value
11. 11
Nagios Core 4 – Object Changes
Minimum Value (contacts)
If hourly value of host or service is less than
contact's minimum value, contact is NOT
notified of problems
Value of host is host's hourly value plus hourly
values of all host's services
Example: sysadmin might have low minimum
value, but CIO might have a high minimum
value
12. 12
Nagios Core 4 – Object Changes
Service parents
Analogous to host parents
Can be used in place of service dependencies
for most cases
Example: check_by_ssh checks could have
check_ssh as parent
Host address attribute is now optional
Set to host name when missing
13. 13
Nagios Core 4 – Object Changes
obsess_over_host and obsess_over_service
now support shorter attribute obsess
failure_prediction_enabled has been removed
14. 14
Nagios Core – Object Behavior
Contact Inheritance
Contacts only inherited by services from hosts if
service has no contacts or contact groups in
its definition
Time Periods
Problems resolved where time periods
contained both exclusions and exceptions
15. 15
Nagios Core 4 – Configuration
status_file and object_cache_file can be set to
“/dev/null”
CGIs still need these files
log_current_states – determines whether
current states are logged when logs are rotated
check_workers – specifies number of core
workers forked at Nagios start
When unspecified, number of workers is
calculated based on number of CPU cores
16. 16
Nagios Core 4 - Configuration
query_socket – location of query handler socket
enable_environment_macros – determines
whether macros are exported to environment
when commands are run
All paths in nagios.cfg can now be relative to
location of nagios.cfg
check_result_reaper_frequency and
max_check_result_reaper_time deprecated
Object definitions in nagios.cfg prohibited
17. 17
Nagios Core 4 - Macros
$CHECKSOURCE$ - new macro containing
name of worker that performed check
When use_large_installation_tweaks set,
$HOSTGROUPMEMBERS$ and
$SERVICEGROUPMEMBERS$ no longer
exported
enable_environment_macros configuration
option (discussed earlier)
Macro-related performance enhancements
18. 18
Nagios Core 4 - Miscellaneous
libnagios – contains code to support worker
development
Documentation – some doxygen formatted
docs now available (make dox)
Test Suite – significantly updated
nagios.spec – overhauled to bring up to current
standards
Object IDs – each object has a unique now has
a unique ID, but it is not persistent
19. 19
Nagios Core 4 – Deprecated Features
Extended Host and Service Information – now
available in host and service definitions
-x/--dont-verify-paths command line option –
Don't check for circular object paths
Configuration variables
check_result_reaper_frequency
max_check_result_reaper_time
sleep_time
external_command_buffer_slots
command_check_interval
20. 20
Nagios Core 4 – Obsoleted Features
Embedded Perl
Most problematic part of Nagios Core
Speed improvement obviates need for
embedded perl
Is possible to write embedded perl core worker
Failure prediction
Never implemented
Would have broken Nagios Core paradigm
-o/--dont-verify-objects command line option
21. 21
Nagios Core 4 – More Information
Nagios Core Documentation
http://nagios.sourceforge.net/docs/nagioscore/4/en/
What's New page
Doxygen Documentation
make dox
nagios-*.tar.gz
Use the Source, Luke