- [Show page]
- [Old revisions]
- [[unknown link type]]
- []
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
people:solovyanov [2017/01/16 18:02] solovyanov created |
people:solovyanov [2017/01/23 16:04] solovyanov |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ============ Nagios ================== | + | ====== NAGIOS ====== |
+ | ===== Strana serveru Nagios ===== | ||
Installace Nagiosu: | Installace Nagiosu: | ||
apt-get install nagios | apt-get install nagios | ||
Operace s procesem: | Operace s procesem: | ||
- | /etc/init.d/nagios3(nrpe/nagios/...) restart(reload/start/stop) | + | /etc/init.d/nagios3(nrpe/nagios/...) restart(reload/start/stop) |
OR | OR | ||
service nagios3(nagios-nrpe-server/...) restart(reload/start/stop) | service nagios3(nagios-nrpe-server/...) restart(reload/start/stop) | ||
+ | ==== Konfigurace ==== | ||
+ | Konfiguracni soubour Nagiosu (obecny): | ||
+ | /etc/nagios3/nagios.cfg | ||
+ | Definice hostu, servicu, hostgroup apod se obvykle provadi v direktorii: | ||
+ | /etc/nagios3/conf.d | ||
+ | |||
+ | Konfiguracni soubory pluginu: | ||
+ | /etc/nagios-plugins/config | ||
+ | |||
+ | Pluginy: | ||
+ | /usr/lib/nagios/plugins | ||
+ | |||
+ | Priklady definic: | ||
+ | |||
+ | **HOST** | ||
+ | <code>define host{ | ||
+ | use generic-host | ||
+ | host_name master | ||
+ | alias master | ||
+ | address master.starlab.cz | ||
+ | hostgroups debian-servers,http-servers,ssh-servers,ping-servers,disk-servers,raid-servers,load-servers,smart-servers | ||
+ | }</code> | ||
+ | |||
+ | **SERVICE** | ||
+ | <code>define service{ | ||
+ | hostgroup_name load-servers | ||
+ | use generic-service | ||
+ | service_description check_load | ||
+ | check_command check_nrpe_1arg!check_load | ||
+ | }</code> | ||
+ | |||
+ | **HOSTGROUP** | ||
+ | <code>define hostgroup { | ||
+ | hostgroup_name load-servers | ||
+ | alias CHECK_LOAD servers } | ||
+ | }</code> | ||
+ | |||
+ | Verifikace konfiguracnich souboru: | ||
+ | nagios3 -v /etc/nagios3/nagios.cfg | ||
+ | |||
+ | Priklady manualniho distacniho spusteni pluginu na danem serveru: | ||
+ | |||
+ | **S NRPE** | ||
+ | /usr/lib/nagios/plugins/check_nrpe -H 10.0.4.31 -c check_disk | ||
+ | **BEZ NRPE** | ||
+ | /usr/lib/nagios/plugins/check_ping -H master.starlab.cz -w 100,10% -c 400,50% | ||
+ | |||
+ | //*cesty k souborum v kazdem samotnem jednotlivem systemu se muzou lisit// | ||
+ | |||
+ | ====== Prikazy ====== | ||
+ | Vsechny soubory v baliku: | ||
+ | dpkg -L aide | ||
+ | | ||
+ | Textovy editor: | ||
+ | vim | ||
+ | |||
+ | netstat (only servers): | ||
+ | netstat -nlpt | ||
+ | |||
+ | touch | ||
+ | | ||
+ | IP-adresy: | ||
+ | ip a | ||
+ | |||
+ | Interface up: | ||
+ | ifap -eth0 | ||
+ | |||
+ | Procesy: | ||
+ | top | ||
+ | |||
+ | Disk: | ||
+ | df |
people/solovyanov.txt · Last modified: 2017/01/23 16:04 by solovyanov