====== Poznamky z kurzu skoleni nagios ====== iptables -I OUTPUT -d 10.0.4.159 -j REJECT iptables -I OUTPUT -d 10.0.4.159 -p tcp --dport 22 -j REJECT ===== Monitoring ucebny ===== A vytvoreni 2D mapy pomoci template {{ :linux:skoleni:tmp_5876-img_20160129_104551-249151051.jpg?600 |}} nagios-ucebna.txt tomas 42 9 226 240 noro 22 7 622 310 martin 29 5 711 319 jakub 23 10 584 114 marek 31 4 436 169 vladimir 40 38 75 95 define host { use generic-host host_name _JMENO_ alias _JMENO_ address 192.168.6._IP_ parents lektor_nb 2d_coords _X_,_Y_ statusmap_image up.gd2 } define host { use generic-host host_name _JMENO_ alias _JMENO_ address 192.168.6._IP_ parents _PARENT_ 2d_coords _X_,_Y_ statusmap_image up.gd2 } #!/bin/bash cat nagios-ucebna.txt | while read jmeno ip1 ip2 x y; do sed "s/_JMENO_/$jmeno$ip1/;s/_IP_/$ip1/;s/_PARENT_/$jmeno$ip2/;s/_X_/$x/;s/_Y_/$y/" ucebna-parent.templ let xx=$x+30 sed "s/_JMENO_/$jmeno$ip2/;s/_IP_/$ip2/;s/_X_/$xx/;s/_Y_/$y/" ucebna.templ done apt-get install nagios-nrpe-server