Nagios Client Installation schlägt fehl

Hallo allerseits,

aufgrund von Fehlern in der Nagios Configuration (PluginNameNotFound) habe ich auf einem UCS Server das Paket univention-nagios-client erneut installiert.
Dabei tritt immer wieder der Fehler auf:

Calling joinscript 30univention-nagios-client.inst ... Joinscript 30univention-nagios-client.inst finished with exitcode 1

Lässt sich irgendwie herausfinden, warum dieses Joinscript abbricht?

Die Meldung wikrt zweifellos irritierend, aber beudetet wohl, daß alles in Ordnung ist:

forge.univention.org/bugzilla/sh … i?id=15082

Dann hat das Problem wohl eine andere Ursache. Es schaut so aus, als ob die Nagios Plugins nicht auffindbar sind. In den meisten Konfigurationsdateien unter

/etc/nagios/nrpe.univention.d/ taucht der Fehler PluginNameNotFoundError auf. Die Pakete sind aber alle frisch installiert.

Hallo,

könnten Sie bitte einmal nachschauen was sich im Pluginverzeichnis befindet?

ls -la /usr/lib/nagios/plugins/

Desweiteren wäre es interessant den Inhalt einer Konfigurationsdatei aus /etc/nagios/nrpe.univention.d/, wo der von Ihnen genannte Fehler auftritt, zu sehen. Evtl. stimmt etwas mit den Pfadangaben nicht.

Viele Grüße
Ulf Friedel

ls -la /usr/lib/nagios/plugins/ liefert:

-rwxr-xr-x 1 root root 106120 29. Okt 2011 check_apt -rwxr-xr-x 1 root root 5369 29. Okt 2011 check_bgpstate -rwxr-xr-x 1 root root 2242 29. Okt 2011 check_breeze -rwxr-xr-x 1 root root 46192 29. Okt 2011 check_by_ssh lrwxrwxrwx 1 root root 9 14. Mai 10:36 check_clamd -> check_tcp -rwxr-xr-x 1 root root 32072 29. Okt 2011 check_cluster -rwxr-xr-x 1 root root 44816 29. Okt 2011 check_dhcp -rwxr-xr-x 1 root root 41392 29. Okt 2011 check_dig -rwxr-xr-x 1 root root 119216 29. Okt 2011 check_disk -rwxr-xr-x 1 root root 8726 29. Okt 2011 check_disk_smb -rwxr-xr-x 1 root root 45488 29. Okt 2011 check_dns -rwxr-xr-x 1 root root 28968 29. Okt 2011 check_dummy -rwxr-xr-x 1 root root 3053 29. Okt 2011 check_file_age -rwxr-xr-x 1 root root 6315 29. Okt 2011 check_flexlm -rwxr-xr-x 1 root root 44656 29. Okt 2011 check_fping lrwxrwxrwx 1 root root 9 14. Mai 10:36 check_ftp -> check_tcp -rwxr-xr-x 1 root root 36584 29. Okt 2011 check_game lrwxrwxrwx 1 root root 10 14. Mai 10:36 check_host -> check_icmp -rwxr-xr-x 1 root root 41136 29. Okt 2011 check_hpjd -rwxr-xr-x 1 root root 164624 29. Okt 2011 check_http -rwxr-xr-x 1 root root 49264 29. Okt 2011 check_icmp -rwxr-xr-x 1 root root 34536 29. Okt 2011 check_ide_smart -rwxr-xr-x 1 root root 15134 29. Okt 2011 check_ifoperstatus -rwxr-xr-x 1 root root 12598 29. Okt 2011 check_ifstatus lrwxrwxrwx 1 root root 9 14. Mai 10:36 check_imap -> check_tcp -rwxr-xr-x 1 root root 6887 29. Okt 2011 check_ircd lrwxrwxrwx 1 root root 9 14. Mai 10:36 check_jabber -> check_tcp -rwxr-xr-x 1 root root 41008 29. Okt 2011 check_ldap lrwxrwxrwx 1 root root 10 14. Mai 10:36 check_ldaps -> check_ldap -rwxr-xr-x 1 root root 3407 29. Okt 2011 check_linux_raid -rwxr-xr-x 1 root root 36168 29. Okt 2011 check_load -rwxr-xr-x 1 root root 6026 29. Okt 2011 check_log -rwxr-xr-x 1 root root 20284 29. Okt 2011 check_mailq -rwxr-xr-x 1 root root 36264 29. Okt 2011 check_mrtg -rwxr-xr-x 1 root root 34440 29. Okt 2011 check_mrtgtraf -rwxr-xr-x 1 root root 45936 29. Okt 2011 check_mysql -rwxr-xr-x 1 root root 44688 29. Okt 2011 check_mysql_query -rwxr-xr-x 1 root root 36616 29. Okt 2011 check_nagios lrwxrwxrwx 1 root root 9 14. Mai 10:36 check_nntp -> check_tcp lrwxrwxrwx 1 root root 9 14. Mai 10:36 check_nntps -> check_tcp -rwxr-xr-x 1 root root 48720 29. Okt 2011 check_nt -rwxr-xr-x 1 root root 46288 29. Okt 2011 check_ntp -rwxr-xr-x 1 root root 44880 29. Okt 2011 check_ntp_peer -rwxr-xr-x 1 root root 42224 29. Okt 2011 check_ntp_time -rwxr-xr-x 1 root root 60912 29. Okt 2011 check_nwstat -rwxr-xr-x 1 root root 8326 29. Okt 2011 check_oracle -rwxr-xr-x 1 root root 40400 29. Okt 2011 check_overcr -rwxr-xr-x 1 root root 40656 29. Okt 2011 check_pgsql -rwxr-xr-x 1 root root 48848 29. Okt 2011 check_ping lrwxrwxrwx 1 root root 9 14. Mai 10:36 check_pop -> check_tcp -rwxr-xr-x 1 root root 114640 29. Okt 2011 check_procs -rwxr-xr-x 1 root root 40624 29. Okt 2011 check_radius -rwxr-xr-x 1 root root 40464 29. Okt 2011 check_real -rwxr-xr-x 1 root root 9581 29. Okt 2011 check_rpc lrwxrwxrwx 1 root root 10 14. Mai 10:36 check_rta_multi -> check_icmp -rwxr-xr-x 1 root root 1137 29. Okt 2011 check_sensors lrwxrwxrwx 1 root root 9 14. Mai 10:36 check_simap -> check_tcp -rwxr-xr-x 1 root root 127216 29. Okt 2011 check_smtp -rwxr-xr-x 1 root root 152008 29. Okt 2011 check_snmp lrwxrwxrwx 1 root root 9 14. Mai 10:36 check_spop -> check_tcp -rwxr-xr-x 1 root root 36688 29. Okt 2011 check_ssh lrwxrwxrwx 1 root root 9 14. Mai 10:36 check_ssmtp -> check_tcp -rwxr-xr-x 1 root root 37832 29. Okt 2011 check_swap -rwxr-xr-x 1 root root 49328 29. Okt 2011 check_tcp -rwxr-xr-x 1 root root 38128 29. Okt 2011 check_time lrwxrwxrwx 1 root root 9 14. Mai 10:36 check_udp -> check_tcp -rwxr-xr-x 1 root root 6808 26. Jun 2013 check_univention_i2o_raid -rwxr-xr-x 1 root root 4143 26. Jun 2013 check_univention_joinstatus -rwsr-xr-x 1 root root 5248 17. Mär 14:32 check_univention_joinstatus_suidwrapper -rwxr-xr-x 1 root root 1585 26. Jun 2013 check_univention_ldap -rwsr-xr-x 1 root root 5008 17. Mär 14:32 check_univention_ldap_suidwrapper -rwxr-xr-x 1 root root 4692 26. Jun 2013 check_univention_nfsstatus -rwxr-xr-x 1 root root 3168 26. Jun 2013 check_univention_nmbd -rwxr-xr-x 1 root root 4698 26. Jun 2013 check_univention_printerqueue -rwxr-xr-x 1 root root 6377 26. Jun 2013 check_univention_replication -rwxr-xr-x 1 root root 2996 26. Jun 2013 check_univention_smbd -rwxr-xr-x 1 root root 1568 26. Jun 2013 check_univention_smtp -rwxr-xr-x 1 root root 3561 26. Jun 2013 check_univention_ssl_certificate -rwxr-xr-x 1 root root 2746 26. Jun 2013 check_univention_winbind -rwsr-xr-x 1 root root 4792 17. Mär 14:32 check_univention_winbind_suidwrapper -rwxr-xr-x 1 root root 44560 29. Okt 2011 check_ups -rwxr-xr-x 1 root root 36168 29. Okt 2011 check_users -rwxr-xr-x 1 root root 2936 29. Okt 2011 check_wave -rwxr-xr-x 1 root root 38152 29. Okt 2011 negate -rwxr-xr-x 1 root root 36104 29. Okt 2011 urlize -rw-r--r-- 1 root root 1938 29. Okt 2011 utils.pm -rwxr-xr-x 1 root root 862 29. Okt 2011 utils.sh

Die Plugins scheinen also erstmal vorhanden zu sein. Scheinbar stimmt wirklich etwas mit den Pfaden nicht, denn es scheint in praktisch keiner Datei zu klappen:

grep "PluginNameNotFoundError" /etc/nagios/nrpe.univention.d/* /etc/nagios/nrpe.univention.d/UNIVENTION_DNS.cfg:command[UNIVENTION_DNS]=PluginNameNotFoundError /etc/nagios/nrpe.univention.d/UNIVENTION_JOINSTATUS.cfg:command[UNIVENTION_JOINSTATUS]=PluginNameNotFoundError /etc/nagios/nrpe.univention.d/UNIVENTION_LDAP_AUTH.cfg:command[UNIVENTION_LDAP_AUTH]=PluginNameNotFoundError /etc/nagios/nrpe.univention.d/UNIVENTION_LIBVIRTD_KVM.cfg:command[UNIVENTION_LIBVIRTD_KVM]=PluginNameNotFoundError /etc/nagios/nrpe.univention.d/UNIVENTION_LOAD.cfg:command[UNIVENTION_LOAD]=PluginNameNotFoundError /etc/nagios/nrpe.univention.d/UNIVENTION_NSCD.cfg:command[UNIVENTION_NSCD]=PluginNameNotFoundError /etc/nagios/nrpe.univention.d/UNIVENTION_RAID.cfg:command[UNIVENTION_RAID]=PluginNameNotFoundError /etc/nagios/nrpe.univention.d/UNIVENTION_REPLICATION.cfg:command[UNIVENTION_REPLICATION]=PluginNameNotFoundError /etc/nagios/nrpe.univention.d/UNIVENTION_SMART_SDA.cfg:command[UNIVENTION_SMART_SDA]=PluginNameNotFoundError /etc/nagios/nrpe.univention.d/UNIVENTION_SMART_SDB.cfg:command[UNIVENTION_SMART_SDB]=PluginNameNotFoundError /etc/nagios/nrpe.univention.d/UNIVENTION_SMART_SDC.cfg:command[UNIVENTION_SMART_SDC]=PluginNameNotFoundError /etc/nagios/nrpe.univention.d/UNIVENTION_SMTP2.cfg:command[UNIVENTION_SMTP2]=PluginNameNotFoundError /etc/nagios/nrpe.univention.d/UNIVENTION_SSL.cfg:command[UNIVENTION_SSL]=PluginNameNotFoundError /etc/nagios/nrpe.univention.d/UNIVENTION_SWAP.cfg:command[UNIVENTION_SWAP]=PluginNameNotFoundError /etc/nagios/nrpe.univention.d/UNIVENTION_UVMMD.cfg:command[UNIVENTION_UVMMD]=PluginNameNotFoundError

[code]less /etc/nagios/nrpe.univention.d/UNIVENTION_LOAD.cfg

Warning: This file is auto-generated and might be overwritten.

Please use univention-directory-manager instead.

Warnung: Diese Datei wurde automatisch generiert und wird

automatisch ueberschrieben. Bitte benutzen Sie

stattdessen den Univention Directory Manager.

command[UNIVENTION_LOAD]=PluginNameNotFoundError[/code]

Hallo,

Dies hat anscheinend wirklich nichts damit zu tun, hab zum Test einmal univention-nagios-client deinstalliert und wieder installiert. Die Meldung ist bei mir die gleiche, hatte jedoch keine Auswirkung im Zusammenhang mit den Plugins.

Sie könnten jedoch dennoch sicherheitshalber nochmals prüfen ob alle Joinscripts erfolgreich waren.

univention-check-join-status

Ich habe mir /etc/nagios/nrpe.univention.d/UNIVENTION_LOAD.cfg einmal auf meinem System angeschaut.

root@master:~# cat /etc/nagios/nrpe.univention.d/UNIVENTION_LOAD.cfg 
# Warning: This file is auto-generated and might be overwritten.
#          Please use univention-directory-manager instead.
# Warnung: Diese Datei wurde automatisch generiert und wird
#          automatisch ueberschrieben. Bitte benutzen Sie
#          stattdessen den Univention Directory Manager.

command[UNIVENTION_LOAD]=/usr/lib/nagios/plugins/check_load --percpu --warning='3,2,1' --critical='6,4,2'

Wobei die command Zeile meines Erachtens aus den im LDAP hinterlegten Angaben generiert wird.

root@master:~# univention-ldapsearch cn=UNIVENTION_LOAD
# extended LDIF
#
# LDAPv3
# base <dc=test,dc=local> (default) with scope subtree
# filter: cn=UNIVENTION_LOAD
# requesting: ALL
#

# UNIVENTION_LOAD, nagios, test.local
dn: cn=UNIVENTION_LOAD,cn=nagios,dc=test,dc=local
univentionNagiosNormalCheckInterval: 5
univentionNagiosNotificationInterval: 180
cn: UNIVENTION_LOAD
univentionNagiosNotificationPeriod: 24x7
univentionNagiosCheckCommand: check_univention_load
objectClass: top
objectClass: univentionNagiosServiceClass
objectClass: univentionObject
univentionNagiosMaxCheckAttempts: 1
description: Default Service: check if cpu load exceeds specified limits
univentionNagiosCheckPeriod: 24x7
univentionNagiosRetryCheckInterval: 2
univentionNagiosCheckArgs: 3!2!1!6!4!2
univentionObjectType: nagios/service
univentionNagiosUseNRPE: 1
univentionNagiosHostname: master.test.local
univentionNagiosNotificationOptions: w,c,u,r

# search result
search: 3
result: 0 Success

# numResponses: 2
# numEntries: 1

Evtl. ist dort vielleicht z.B. univentionNagiosCheckCommand nicht korrekt eingetragen. Eine Änderung dieses Eintrages führte bei mir sofort zu command[UNIVENTION_LOAD]=PluginNameNotFoundError in der jeweiligen Konfigurationsdatei.

Viele Grüße
Ulf Friedel

Hallo Herr Friedel,

vielen Dank für Ihre Tests und Hilfe. Leider liegt es auch nicht an fehlenden Einträgen im LDAP. Aber seit dem letzten Errata Update https://errata.univention.de/ucs/3.2/129.html, bei dem auch in Nagios veränderungen stattgefunden haben, klappt es jetzt offenbar.

Beste Grüße

Mastodon