it is my first time setting up nagios core on ubuntu server 18LTS. for the most part i followed online tutorials and this has helped me a lot. and i was able to do a lot. i wanted to add a windows server 2016 host - this seems a bit trickie.
i have installed nsclient++ on the server.
this is what i get in the nagios screen :
winserver C:\ Drive Space UNKNOWN 07-16-2018 17:58:36 0d 0h 12m 44s 3/3 check_nt: Could not parse arguments
CPU Load UNKNOWN 07-16-2018 17:59:35 0d 0h 11m 45s 3/3 check_nt: Could not parse arguments
Memory UsageUNKNOWN 07-16-2018 18:01:32 0d 0h 11m 21s 3/3 check_nt: Could not parse arguments
en so on .... for others
can someone please help me with this ? what info do you need ?
vim /usr/local/nagios/etc/nagios.cfg:
cfg_file=/usr/local/nagios/etc/objects/localhost.cfg
cfg_file=/usr/local/nagios/etc/objects/windows.cfg ( windows server 2016 file)
vi /usr/local/nagios/etc/objects/windows.cfg: ( some commands - you get the picture)
Code: Select all
define host {
use windows-server ; Inherit default values from a template
host_name winserver ; The name we're giving to this host
alias My Windows Server ; A longer name associated with the host
address 192.168.174.10 ; IP address of the host
}
define hostgroup {
hostgroup_name windows-servers ; The name of the hostgroup
alias Windows Servers ; Long name of the group
}
define service {
use generic-service
host_name winserver
service_description Uptime
check_command check_nt!UPTIME
}
define service {
use generic-service
host_name winserver
service_description CPU Load
check_command check_nt!CPULOAD!-l 5,80,90
}
define service {
use generic-service
host_name winserver
service_description Memory Usage
check_command check_nt!MEMUSE!-w 80 -c 90
}
define service {
use generic-service
host_name winserver
service_description C:\ Drive Space
check_command check_nt!USEDDISKSPACE!-l c -w 80 -c 90
}
define service {
use generic-service
host_name winserver
service_description W3SVC
check_command check_nt!SERVICESTATE!-d SHOWALL -l W3SVC
}
define service {
use generic-service
host_name winserver
service_description Explorer
check_command check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
}
vim /usr/local/nagios/etc/objects/commands.cfg ( some commands - you get the picture)
Code: Select all
define command {
command_name check-host-alive
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5
}
define command {
command_name check_local_disk
command_line $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
}
define command {
command_name check_local_load
command_line $USER1$/check_load -w $ARG1$ -c $ARG2$
}
define command {
command_name check_local_procs
command_line $USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
}
define command {
command_name check_nt
command_line $USER1$/check_nt -H 192.168.174.10 -p 12489 -v -s dhpBh6O4Meyc7DFS $ARG1$ $ARG2$
}
i get: NSClient++ 0.5.2.35 2018-01-28
when i execute :
root@nagios:/usr/local/nagios/libexec# /usr/local/nagios/libexec/check_nt -H 192.168.174.10 -p 12489 -s dhpBh6O4Meyc7DFS -v MEMUSE
Memory usage: total:5502.99 MB - used: 1404.93 MB (26%) - free: 4098.05 MB (74%) | 'Memory usage'=1404.93MB;0.00;0.00;0.00;5502.99
so is this working ??? i don't understand what i'm doing wrong. can some please kindly help me with this perhaps ?
kind regards