nagios nrpe

Fórumok

Sziasztok ,

Kuzdok mar egy ideje a kovetkezo problemaval:

Van egy monitoring nagios server es van egy remote host amelyiken a /home particio foglaltsagat szeretnem monitorozni.
A serverre es a hostra is feltettem a nrpe plugint s a kovetkezot mondja nagios:
CHECK_NRPE: Error - Could not complete SSL handshake.

Ha a remote hoston nezem akkor :

/usr/local/nagios/libexec/check_nrpe -H localhost
NRPE v2.12
ill.
netstat -at | grep nrpe
tcp 0 0 *:nrpe *:* LISTEN
ill.
/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /home
DISK OK - free space: /home 99035 MB (78% inode=98%);| /home=27563MB;106699;120036;0;133374

ha a serveren

/usr/local/nagios/libexec/check_nrpe -H 127.0.0.1

CHECK_NRPE: Error - Could not complete SSL handshake.

Turtam a netet , leirasokat (azok alapjan lottem be ) de nem jovok ra mit boktem el.

Kerlek segitsetek

Koszonom

Sztupi

Hozzászólások

xinetd ébreszti az nrpe-t? Mert akkor engedélyezni kell azt az IP-t is, amiről el akarod érni...
--
unix -- több, mint kód. filozófia.
Life is feudal

Szia ,

Ez van a conf-ban:

/etc/xinetd.d# cat nrpe
# default: on
# description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
flags = REUSE
socket_type = stream
port = 5666
wait = no
user = nagios
group = nagios
server = /usr/local/nagios/bin/nrpe
server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd
log_on_failure += USERID
disable = no
only_from = 127.0.0.1

Az nrpe-t a servren probaltam meg nem bokdostem a host-ot.
egyenlore itt akadt el. (marmint onmagan a serveren)

Ha a hostot bokdosom akkor is ezt mondja

/usr/local/nagios/libexec/check_nrpe -H 192.168.1.231
CHECK_NRPE: Error - Could not complete SSL handshake.

es a xinet.d/nrpe -ben ez van (a hoston)
# default: on
# description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
flags = REUSE
socket_type = stream
port = 5666
wait = no
user = nagios
group = nagios
server = /usr/local/nagios/bin/nrpe
server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd
log_on_failure += USERID
disable = no
only_from = 192.168.1.41

Mit hívsz szervernek? Van egy gép, ahol a nagios fut. Egy másik, aminek a /home könyvtárát akarod figyelni. Ahol a /home van, azon a gépen fusson xinetd, nrpe és legyen beállítva /etc/xinetd.d/xinetd /etc/services file. /etc/init.d/xinetd restart se maradjon el. Természetesen a pluginek legyenek fent azon a gépen, hlózati kapcsolat már annyira triviális, hogy nem is említem.
--
unix -- több, mint kód. filozófia.
Life is feudal

Helló!

Szerintem a hibaüzenet egyértelmű:
"Could not complete SSL handshake."
Authentikált, titkosított csatornát kértél, de nem adtál meg jó kulcsokat.

Nem kell kulcs mert az nrpe démon és a check_nrpe Anonymous DH Mode-t használ, azak "csak úgy" megegyeznek a kulcsban, sem a szerver , sem a kliens nem hitelesíti egymást. Ez a legbutább SSL mód.

Ezek lehetnek:

This error message could be due to several problems:

1. Different versions. Make sure you are using the same version of the check_nrpe plugin and the NRPE daemon. Newer versions of NRPE are usually not backward compatible with older versions.
2. SSL is disabled. Make sure both the NRPE daemon and the check_nrpe plugin were compiled with SSL support and that neither are being run without SSL support (using command line switches).
3. Incorrect file permissions. Make sure the NRPE config file (nrpe.cfg) is readable by the user (i.e. nagios) that executes the NRPE binary from inetd/xinetd.
4. Pseudo-random device files are not readable. Greg Haygood noted the following... "After wringing my hair out and digging around with truss, I figured out the problem on my Solaris 8 boxen. The files /devices/pseudo/random* (linked through /dev/*random, and provided by Sun patch 111238) were not readable by the nagios user I use to launch NRPE. Making the character devices world-readable solved it."

Hello!

Nekem is volt ilyen hibaüzenetem, és nekem a host allow volt a megoldás, illetve a portot sem árt kiengedni a tűzfalon.
NRPE nek meg kell adni hogy milyen ip címről szeretnéd, hogy lekérdezhető legyen.
Esetleg ellenőrizni lehet, hogy az openssl csomag telepítve van e.

openssl: mind a serveren mind a hoston fennt van . nrpe mindket helyen ua a verzio.
hoston /etc/host.allows-ban
"nrpe : 192.168.41 : ALL : allow"

valamint a hoston a /etc/nagios/nrpe.cfg -ben

"pid_file=/var/run/nrpe.pid
server_port=5666
server_address=192.168.1.41
nrpe_user=nagios
nrpe_group=nagios
allowed_hosts=127.0.0.1 192.168.1.41
dont_blame_nrpe=0
debug=0
command_timeout=60
connection_timeout=300
command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
command[check_home]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /home
command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200 "
ezek vannak.
Tuzfal nincs.

A hoston a ps re ezt adja:
ps aux | grep nrpe
nagios 2072 0.0 0.0 3744 856 ? Ss 14:59 0:00 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d
root 3285 0.0 0.0 4864 776 pts/1 S+ 15:10 0:00 grep nrpe

es nem megy ua az a hibat adja

Hát ha más nem nrpe -s kérések lefutnak, meg a szerveren is a saját ellenőrzések, akkor az nrpe nek lesz valami gondja.
A szerveren az nrpe plugin telepítve van?
Ha jól emlékszek ott be kell másolni az nrpe plugint a plugins könyvtárba
(bár elég régen volt már mikor konfigoltam)

"más" checkek nem érdekesek. Ami nem NRPE, az jelen esetben lényegtelen. Az NRPE-re koncentrálj. És ne arra a gépre kérdezd le az NRPE-t, amin a nagios fut. A célon levő NRPE-t szólítsd meg. A cél gépen indítsd újra az xinetd-t, ne a nagioson. És ellenőrizd le, hogy tényleg figyeé-e a process.
--
unix -- több, mint kód. filozófia.
Life is feudal

Azon kell amit monitorozni szeretnél. Nem tudom nálad mit jelent a host/nagios server. Ja és természetesen xinet legyen felrakva, ha így csinálod. Van egy dokumentáció amit csináltam a nagios plugin/nrpe telepítéséről és használatáról, szívesen elküldöm privátban ha kell.

A célon:

- netstat -at | grep nrpe
" tcp 0 0 *:nrpe *:* LISTEN "
tehat figyel az nrpe
- xinetd-t restartorltam
- celon le is kerdezi a check_nrpe
" /usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /home
DISK OK - free space: /home 98863 MB (78% inode=98%);| /home=27736MB;106699;120036;0;133374"
a nagioson:

"/usr/local/nagios/libexec/check_nrpe -H 192.168.1.231
CHECK_NRPE: Error - Could not complete SSL handshake."

A hoston a ps re ezt adja:
ps aux | grep nrpe
nagios 2072 0.0 0.0 3744 856 ? Ss 14:59 0:00 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d

Viszont itt ez a konfig van megadva:
server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd

Vagy az xinetd.d/nrpe az nem a megfigyelni akart általad hostnak hívott gépen van? Mert ott kéne lennie. De ha ott van, akkor két eltérő konfigfájl path-ot látok. Az egyik a ps kimenetében levő, a másik pedig a /etc/xinetd.d/nrpe ben levő. Ekkor az a kérdés, hogy a futó nrpe process honnan van? Mert nem az xinetd indította el. Hacsak nem link az egyik a másikra. Ez lehet magyarázat erre a hibaüzenetre:
bind failed (Address already in use (errno = 98)). service = nrpe
És még ezt is csekkold le szerintem:
a nagioson:

"/usr/local/nagios/libexec/check_nrpe -H 192.168.1.231
CHECK_NRPE: Error - Could not complete SSL handshake."

nagios 2060 0.0 0.0 3772 832 ? Ss 11:44 0:00 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d --no-ssl

Az a --no-ssl a ps kimenetében érdemel egy kis figyelmet.

--
unix -- több, mint kód. filozófia.
Life is feudal

A libssl-dev csomagot felraktad? Akkor szokott az ssl-re panaszkodni, ha nincs fent.

Jó lenne megnézni a naplót.
--
unix -- több, mint kód. filozófia.
Life is feudal

mely reszere goldoltal ?
Most a xinetd-re kezdek gyanakodni, marmint h o a ludas
Dec 23 11:32:26 piton xinetd[2165]: Reading included configuration file: /etc/xinetd.d/nrpe [file=/etc/xinetd.d/nrpe] [line=26]
Dec 23 11:32:26 piton xinetd[2165]: bind failed (Address already in use (errno = 98)). service = nrpe
Dec 23 11:32:26 piton xinetd[2165]: Service nrpe failed to start and is deactivated.

Csapj egy -n kapcsolót a parancssorba (-n = Do no use SSL), de a főnöködnek (és az enyémnek) ne mondd, hogy én tanácsoltam, mert úgyis letagadom!

belevestem a kis szanalmast .
S a syslogban ezt irja:
Dec 23 11:44:57 piton nrpe[2059]: Added command[check_users]=/usr/lib/nagios/plugins/check_users -w 5 -c 10
Dec 23 11:44:57 piton nrpe[2059]: Added command[check_load]=/usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
Dec 23 11:44:57 piton nrpe[2059]: Added command[check_hda1]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /dev/hda1
Dec 23 11:44:57 piton nrpe[2059]: Added command[check_zombie_procs]=/usr/lib/nagios/plugins/check_procs -w 5 -c 10 -s Z
Dec 23 11:44:57 piton nrpe[2059]: Added command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w 150 -c 200
Dec 23 11:44:57 piton nrpe[2059]: INFO: SSL/TLS NOT initialized. Network encryption DISABLED.
Dec 23 11:44:57 piton nrpe[2060]: Starting up daemon
Dec 23 11:44:57 piton nrpe[2060]: Listening for connections on port 5666
Dec 23 11:44:57 piton nrpe[2060]: Allowing connections from: 127.0.0.1 192.168.1.231
Dec 23 11:45:02 piton xinetd[2170]: Reading included configuration file: /etc/xinetd.d/nrpe [file=/etc/xinetd.d/nrpe] [line=26]
Dec 23 11:45:02 piton xinetd[2170]: bind failed (Address already in use (errno = 98)). service = nrpe
Dec 23 11:45:02 piton xinetd[2170]: Service nrpe failed to start and is deactivated.

" Reading included configuration file: /etc/xinetd.d/nrpe [file=/etc/xinetd.d/nrpe] [line=26]"

wtf!! a nrpe csak 16 sorbol all ???

Dec 23 11:45:02 piton xinetd[2170]: bind failed (Address already in use (errno = 98)). service = nrpe
Dec 23 11:45:02 piton xinetd[2170]: Service nrpe failed to start and is deactivated.

" Reading included configuration file: /etc/xinetd.d/nrpe [file=/etc/xinetd.d/nrpe] [line=26]"

nem bassza ki a szemed?

csak egy fut :

nagios 2060 0.0 0.0 3772 832 ? Ss 11:44 0:00 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d --no-ssl
root 12300 0.0 0.0 3356 796 pts/1 R+ 13:28 0:00 grep nrpe
viszont Te irtad "nem bassza ki a szemed? " es ahogy raneztem ezt lattam.:

nagios serverrol :

"telnet 192.168.1.231 5666
Trying 192.168.1.231...
Connected to 192.168.1.231.
Escape character is '^]'.
Connection closed by foreign host"

hostrol:

"telnet 192.168.1.41 5666
Trying 192.168.1.41...
telnet: Unable to connect to remote host: Connection refused"

Nem lehet ez vmi xinetd hiba ?

Miert nem jo a standalone NRPE daemon?

Sziasztok,

Mukodik . Koszonom mindenkinek a segitseget.

Ket szarvas hibat vettettem. Leirom tanulsagkent.

1, a telepitesi howtom-bol hianyzott a remote host nrpe install szekciobol a "make install-xinetd" s ezert nem inditotta a xinetd.
gyorik kollega altal kuldott doksi segitett ebben. Itt van (http://nagios.sourceforge.net/docs/nrpe/NRPE.pdf) a jo leiras.

2, nagios3-at tettem fel de a fenti leiras a nagios2-re vonatkozik. Figyelni kell arra , hogy a
define command -ot a /etc/nagios-plugins/config/nrpe.cfg-be kell beirni.