This is an old revision of the document!


Jak funguje nas poplasny Nagios Majak

schema je jednoduche Client: nagios zavola prikaz “echo “nejaky problem” | netcat 10.0.5.5:6555

Server s majakem: inetd posloucha na portu 6555 a spousti skript /home/majak/bin/majak.sh, ktery zapise na /dev/ttyUSB0 prikazy “start_blink” nebo “stop_blink”

Overit funkcnost majaku na strane serveru muzete na dvou kontrolnich mistech 1. zapsat primo na /dev/ttyUSB0

 echo start_blink > /dev/ttyUSB0

2. zapsat na localhost port 6555

root@cerna-ng:~# telnet localhost 6555
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
nagios vola, nejaky CRITICAL problem
Connection closed by foreign host.
root@cerna-ng:~#
root@cerna-ng:/root# telnet localhost 6555
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
libovolny text, neobsahujici slovo c-r-i-t-i-c-a-l
^]
telnet> close
Connection closed.
root@cerna-ng:/etc/init.d# 
 
hardware/majak.1456259619.txt.gz · Last modified: 2016/02/23 21:33 by admin