Difference between revisions of "nagios notes"

From thelinuxwiki
Jump to: navigation, search
(host definitions)
 
(16 intermediate revisions by one user not shown)
Line 1: Line 1:
==guide==
+
 
 +
'''[https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/4/en/toc.html rtfm link - nagios 4]'''
 +
 
 +
 
 
===host definitions===
 
===host definitions===
  
Line 16: Line 19:
 
register: 0 = don't treat it as a real host definition (it's a template)
 
register: 0 = don't treat it as a real host definition (it's a template)
  
 +
==troubleshooting inheritence==
 +
 +
view all attributes inherited for an object in '''var/objects.cache'''
 +
 +
regenerated on nagios startup
 +
 +
 +
==distributed monitoring==
  
 +
central nagios server - active check are limited or there are none. checks are passive, monitoring data/status is received via "external commands" submitted through ocpd
  
testing without auth
+
to be added...
  
/etc/nagios/cgi.cfg
+
dummy command checks
+
use_authentication=0
+
  
====config reload====
+
active/passive checking
# ?????
+
  
== plugins ==
+
[https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/4/en/freshness.html Host and Service Freshness Checks]
  
/usr/lib/nagios/plugins
 
  
 +
check_freshness 1
 +
freshness_threshold <seconds until unknown/stale state>
  
 +
add "process_perf_data 1" to generic host and service template on collectors to signal ocpd to tranfer data for checks to central
  
  
  * Messages for package net-analyzer/nrpe-2.14:
+
ocpd pickups writes from checks to files below and transfers them via nsca to central
 +
  var/log/nagios/host-perfdata.fifo
 +
var/log/nagios/service-perfdata.fifo
  
* If you plan to use "nrpe_check_control" then you may want to specify
+
config file rc.ocpd
* different command and services files. You can override the defaults
+
* through the "NAGIOS_COMMAND_FILE" and "NAGIOS_SERVICES_FILE" environment variables.
+
* NAGIOS_COMMAND_FILE=/var/rw/nagios.cmd
+
* NAGIOS_SERVICES_FILE=/etc/services.cfg
+
* If you are using the nrpe daemon, remember to edit
+
* the config file /etc/nagios/nrpe.cfg
+
  
 +
notifications disabled globally for collectors in rc.nagios
  
* This ebuild has a number of USE flags which determines what nagios is able to monitor.
+
send_nsca.cfg contains password for encrypting / decrypting command channel
* Depending on what you want to monitor with nagios, some or all of these USE
+
* flags need to be set for nagios to function correctly.
+
* '''contrib plugins are installed into /usr/lib/nagios/plugins/contrib'''
+
  
* Messages for package net-analyzer/nrpe-2.14:
+
==graphing==
 +
[https://exchange.nagios.org/directory/Addons/Graphing-and-Trending Addons for Graphing-and-Trending]
  
* If you plan to use "nrpe_check_control" then you may want to specify
+
[https://support.nagios.com/kb/article/nagios-core-performance-graphs-using-influxdb-nagflux-grafana-histou-802.html Nagios Core - Performance Graphs Using InfluxDB + Nagflux + Grafana + Histou]
* different command and services files. You can override the defaults
+
* through the "NAGIOS_COMMAND_FILE" and "NAGIOS_SERVICES_FILE" environment variables.
+
* NAGIOS_COMMAND_FILE=/var/rw/nagios.cmd
+
* NAGIOS_SERVICES_FILE=/etc/services.cfg
+
* If you are using the nrpe daemon, remember to edit
+
* the config file /etc/nagios/nrpe.cfg
+
  
  
 +
==plugins==
 +
[https://nagios-plugins.org/doc/guidelines.html Nagios Plugins Development Guidelines]
 
[[category:nagios]]
 
[[category:nagios]]

Latest revision as of 18:17, 1 March 2022

rtfm link - nagios 4


Contents

host definitions

templates

minimal host template

define host {
		name		linux_server_template
		use		generic_host
		register	0
}

use : the template that this definition inherits from

register: 0 = don't treat it as a real host definition (it's a template)

troubleshooting inheritence

view all attributes inherited for an object in var/objects.cache

regenerated on nagios startup


distributed monitoring

central nagios server - active check are limited or there are none. checks are passive, monitoring data/status is received via "external commands" submitted through ocpd

to be added...

dummy command checks

active/passive checking

Host and Service Freshness Checks


check_freshness 1 freshness_threshold <seconds until unknown/stale state>

add "process_perf_data 1" to generic host and service template on collectors to signal ocpd to tranfer data for checks to central


ocpd pickups writes from checks to files below and transfers them via nsca to central

var/log/nagios/host-perfdata.fifo 
var/log/nagios/service-perfdata.fifo

config file rc.ocpd

notifications disabled globally for collectors in rc.nagios

send_nsca.cfg contains password for encrypting / decrypting command channel

graphing

Addons for Graphing-and-Trending

Nagios Core - Performance Graphs Using InfluxDB + Nagflux + Grafana + Histou


plugins

Nagios Plugins Development Guidelines