Nagios: Difference between revisions

Content added Content deleted
No edit summary
No edit summary
Line 1:
 
= Installation =
Update System:
sudo apt update -y
Line 14 ⟶ 15:
check_external_commands=1
 
Add= Adding a Host: =
sudo nano aman-client1.cfg
<pre>
Line 24 ⟶ 25:
#hostgroups allhosts ; Host groups this host is associated with
}
 
</pre>
sudo service nagios3 restart
 
= Monitoring python process =
 
sudo nano /etc/nagios3/commands.cfg
 
<pre>
#################
# Check_Python
#################
 
define command{
command_name check_python
command_line /usr/lib/nagios/plugins/check_procs -c 1: -C '$ARG1$' -a '$ARG2$'
}
</pre>
 
 
sudo nano /etc/nagios3/conf.d/aman-client1.cfg
<pre>
## Check Watchdog Script
 
define service {
use generic-service ; Inherit default values from a template
host_name localhost
service_description Watchdog Script
check_command check_python!python3!watchdog.py
}
</pre>
 
= Monitor HTTP Site =
 
sudo nano /etc/nagios3/conf.d/aman-client1.cfg
<pre>
## Check Mediawiki Site
 
define service {
use generic-service ; Inherit default values from a template
host_name localhost
service_description MediaWiki Server
check_command check_http!-H localhost!-u /aviwiki/index.php/Main_Page
}
</pre>