Icinga2: Difference between revisions

From Halfface
Jump to navigationJump to search
 
(One intermediate revision by the same user not shown)
Line 53: Line 53:
  /usr/lib64/nagios/plugins/custom/check_ceph_scrub.py
  /usr/lib64/nagios/plugins/custom/check_ceph_scrub.py
  /usr/lib64/nagios/plugins/custom/check_ceph_versions.py
  /usr/lib64/nagios/plugins/custom/check_ceph_versions.py
==stats==
Why does icinga2 use lots of memory. Look at config and sort by resources
icinga2 daemon -C | grep information/ConfigItem: | sort -k6 -n | tail -5

Latest revision as of 09:21, 15 April 2026

nrpe config. /etc/nagios/nrpe.cfg

log_facility=daemon
debug=0
pid_file=/run/nagios/nrpe.pid
server_port=5666
nrpe_user=nagios
nrpe_group=nagios
allowed_hosts=127.0.0.1,::1
dont_blame_nrpe=0
allow_bash_command_substitution=0
command_timeout=60
connection_timeout=300
disable_syslog=0
command[check_users]=/usr/lib/nagios/plugins/check_users -w 5 -c 10
command[check_load]=/usr/lib/nagios/plugins/check_load -r -w .15,.10,.05 -c .30,.25,.20
command[check_hda1]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /dev/hda1
command[check_zombie_procs]=/usr/lib/nagios/plugins/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w 150 -c 200
include=/etc/nagios/nrpe_local.cfg
include_dir=/etc/nagios/nrpe.d/

talk to nrpe

/usr/lib/nagios/plugins/check_nrpe -H 172.22.65.13
NRPE v4.1.0

list signing request

icinga2 ca list
icinga2 ca sign <fingerprint>

List services

icinga2 object list --type Service

List hosts

icinga2 object list --type Host

List most

icinga2 object list

list checks on remote windows machine

gc -tail 10 "C:\Program Files\NSClient++\nsclient.ini"
[/settings/external scripts/alias]
check_disk = CheckDriveSize MinWarn=10% MinCrit=5% CheckAll FilterType=FIXED
check_load = check_cpu filter=none warn=90 crit=95
check_io = CheckCounter Counter:DiskIO=\\PhysicalDisk(_Total)\\Disk\ Bytes/sec
alias_memory = check_memory warn=99 crit=100
ipsec_hypergene = check_ping 10.255.255.1
ipsec_sharp = check_ping 192.168.77.1
ipsec_telia = check_ping 192.168.20.1

list historic events

ls -c1 -rt /var/log/icinga2/icinga2.log* | while read i ; do zcat -f $i | grep "ElKretsenIpsecTelia" | grep information/Notification | grep oncall-notification ; done

Custom checks

/usr/lib64/nagios/plugins/custom/check_ceph_crash.py
/usr/lib64/nagios/plugins/custom/check_ceph_df.py
/usr/lib64/nagios/plugins/custom/check_ceph_health.py
/usr/lib64/nagios/plugins/custom/check_ceph_mgr.py
/usr/lib64/nagios/plugins/custom/check_ceph_mon.py
/usr/lib64/nagios/plugins/custom/check_ceph_osd.py
/usr/lib64/nagios/plugins/custom/check_ceph_rgw_sync_status.py
/usr/lib64/nagios/plugins/custom/check_ceph_scrub.py
/usr/lib64/nagios/plugins/custom/check_ceph_versions.py

stats

Why does icinga2 use lots of memory. Look at config and sort by resources

icinga2 daemon -C | grep information/ConfigItem: | sort -k6 -n | tail -5