Basic nagios question
Posted: Mon Feb 11, 2019 11:23 am
Hi,
I need to set up an monitoring system for my company, i'm trying to configure nagios for Windows server monitoring, i followed theses steps :
https://assets.nagios.com/downloads/nag ... installing
First i have to say that the paths was wrong for ncpa.cfg, my commands.cfg file wasn't created at all, and some of other things that are burning my brain.
So far i did theses steps :
1 - Followed the usual check_ncpa.py plugins install #Everything ok
2 - I had to create "commands.cfg" to /usr/local/nagios/etc/ and added :
3 - I used locate to find ncpa.cfg (/usr/local/ncpa/etc/ncpa.cfg) and i edited it with the usual config :
4 - I have installed NCPA for W32 bits on my 2012 server without ANY config cuz i there is no clear explanation, wtf is a token ? where do i find it ? what is the point of this thing ? I do not specify any token and the install keep going... so i was able to check local server 127.0.0.1:5693 was working find just pressed enter at login screen, no password...
5 - Did a "net stop ncpalistener && net start ncpalistener && net stop ncpapassive && net stop ncpapassive" on my sh**ty 2012 R2 server.
6 - Did a "service nagios restart" and here we are that's where the pain in the a** become
This is the fourth monitoring software i'm trying to set up and there no "normal" installation for monitoring, it has to be complicated all the time, i can't understand why dev's are building brain salad, i just want to monitor my windows servers :'(
Back to the job, i get this error message (service can't start obviously, btw nagios gui was ok before npca install)
BTW sorry kids for my language but i'm a bit pis**d off, 6 hours on this thing and can't get it to work for a simple task : a windows server check, i tryied at least twenty google "solution" nothing worked and it f**ked up my server so i had to used a snapshot to fresh install and tryed back npca install and here i am.
I appologize too for any english grammatical/or anything mistake cuz that's not my main language and my studies didn't helped so i had to learn by myself :X
I need to set up an monitoring system for my company, i'm trying to configure nagios for Windows server monitoring, i followed theses steps :
https://assets.nagios.com/downloads/nag ... installing
First i have to say that the paths was wrong for ncpa.cfg, my commands.cfg file wasn't created at all, and some of other things that are burning my brain.
So far i did theses steps :
1 - Followed the usual check_ncpa.py plugins install #Everything ok
2 - I had to create "commands.cfg" to /usr/local/nagios/etc/ and added :
Code: Select all
define command {
command_name check_ncpa
command_line $USER1$/check_ncpa.py -H $HOSTADDRESS$ $ARG1$
}
Code: Select all
define host {
host_name SRV-AADC
address 192.168.70.28
check_command check_ncpa!-t '' -P 5693 -M system/agent_version
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
contacts nagiosadmin
notification_interval 60
notification_period 24x7
notifications_enabled 1
icon_image ncpa.png
statusmap_image ncpa.png
register 1
}
define service {
host_name SRV-AADC
service_description CPU Usage
check_command check_ncpa!-t '' -P 5693 -M cpu/percent -w 20 -c 40 -q 'aggregate=avg'
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
notification_interval 60
notification_period 24x7
contacts nagiosadmin
register 1
}
define service {
host_name SRV-AADC
service_description CPU Usage
check_command check_ncpa!-t '' -P 5693 -M cpu/percent -w 20 -c 40 -q 'aggregate=avg'
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
notification_interval 60
notification_period 24x7
contacts nagiosadmin
register 1
}
define service {
host_name SRV-AADC
service_description Memory Usage
check_command check_ncpa!-t '' -P 5693 -M memory/virtual -w 50 -c 80 -u G
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
notification_interval 60
notification_period 24x7
contacts nagiosadmin
register 1
}
define service {
host_name SRV-AADC
service_description Process Count
check_command check_ncpa!-t '' -P 5693 -M processes -w 150 -c 200
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
notification_interval 60
notification_period 24x7
contacts nagiosadmin
register 1
}
5 - Did a "net stop ncpalistener && net start ncpalistener && net stop ncpapassive && net stop ncpapassive" on my sh**ty 2012 R2 server.
6 - Did a "service nagios restart" and here we are that's where the pain in the a** become
This is the fourth monitoring software i'm trying to set up and there no "normal" installation for monitoring, it has to be complicated all the time, i can't understand why dev's are building brain salad, i just want to monitor my windows servers :'(
Back to the job, i get this error message (service can't start obviously, btw nagios gui was ok before npca install)
Code: Select all
févr. 11 16:52:31 Nagios nagios[38799]: Nagios Core 4.4.3
févr. 11 16:52:31 Nagios nagios[38799]: Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
févr. 11 16:52:31 Nagios nagios[38799]: Copyright (c) 1999-2009 Ethan Galstad
févr. 11 16:52:31 Nagios nagios[38799]: Last Modified: 2019-01-15
févr. 11 16:52:31 Nagios nagios[38799]: License: GPL
févr. 11 16:52:31 Nagios nagios[38799]: Website: https://www.nagios.org
févr. 11 16:52:31 Nagios nagios[38799]: Reading configuration data...
févr. 11 16:52:31 Nagios nagios[38799]: Read main config file okay...
févr. 11 16:52:31 Nagios nagios[38799]: Error: Unexpected token or statement in file '/usr/local/ncpa/etc/ncpa.cfg' on line 12.
févr. 11 16:52:31 Nagios nagios[38799]: Error: Command name of command line is NULL
févr. 11 16:52:31 Nagios nagios[38799]: Error: Could not register command (config file '/usr/local/nagios/etc/objects/commands.cfg', starting on line 257)
févr. 11 16:52:31 Nagios nagios[38799]: Error processing object config files!
févr. 11 16:52:31 Nagios nagios[38799]: ***> One or more problems was encountered while processing the config files...
févr. 11 16:52:31 Nagios nagios[38799]: Check your configuration file(s) to ensure that they contain valid
févr. 11 16:52:31 Nagios nagios[38799]: directives and data definitions. If you are upgrading from a previous
févr. 11 16:52:31 Nagios nagios[38799]: version of Nagios, you should be aware that some variables/definitions
févr. 11 16:52:31 Nagios nagios[38799]: may have been removed or modified in this version. Make sure to read
févr. 11 16:52:31 Nagios nagios[38799]: the HTML documentation regarding the config files, as well as the
févr. 11 16:52:31 Nagios nagios[38799]: 'Whats New' section to find out what has changed.
févr. 11 16:52:31 Nagios systemd[1]: nagios.service: Control process exited, code=exited status=1
févr. 11 16:52:31 Nagios systemd[1]: Failed to start Nagios Core 4.4.3.
I appologize too for any english grammatical/or anything mistake cuz that's not my main language and my studies didn't helped so i had to learn by myself :X