I follow the steps in "Passive Checks Simplified.htm" :
fisrt, install NC_Net_V4.1a_setup.zip
second,Modify startup.cfg (as a minimum modify the following variables)
ip_passive - change this to the IP address of the NSCA/Nagios server.
interval_passive - change this to the number of minutes between passive checks.
interval_passive_div = this is a divisor for the interval (an interval of 5 with a divisor of 2, then checks are run every 2.5 min)
host_passive - change this to the Host name for this server in Nagios.(default is the Computer name from WMI)
Set passive_alwayson if you want Passive checks to stay on after an NSCA failure.
set embeded_send_nsca to true
Set passive_check to true. (this is the master ON/OF for Passive checks
third,Modify passive.cfg,I just add this line to the file:
CLIENTVERSION CLIENTVERSION
then I start NC_Net service.
i know the nagios get the checks results from NC_Net,but seems that it take the string as wrong format.
with a normal condition,there must be an "OK" in the header of results.I don't know why NC_Net doesn't give,then all the check results will be critical,because nagios didn't understand it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Nagios does not need an OK in the output.
Nagios uses the return code to determine 0 OK, 1 WARNING,2 CRITICAL ,3 UNKNOWN.
The OK is just a standard on many check- types.
However NC_Net, for the most part, follows the format of the original NS_CLient that way the output would not differ from NS_Client. THis was done to preserve postprocessing that some companies may be doing.
I will have to do my own testing to verify. I think you uncovered an issue with the CLIENTVERSION passive check. Originally Clientversion always returned a OK value, However This was changed to support string comparing of the CLIENTVERSION before sending the result out. (look at "check_nc_net --help=CLIENTVERSION")
Try the following and see if it resolves the issue
a) remove trailing spaces on the CLIENTVERSION command line in the passive.cfg, also make sure there is a blank line at the end of the file,
b) add the string to compare in this case it would be NC_Net 4.1a 03/30/07
CLIENTVERSION[tab]CLIENTVERSION[tab]-l[tab]NC_Net 4.1a 03/30/07
c) it is pospible that this is a bug, but I need to check the code and do my own testing before I can validate that it was not just a configuration issue.
you can populate the passive.cfg file by using the activechecks via check_nc_net.c sometimes it is easier to use that in order tonot have to worry about extra spaces or Tabs.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i did as your advice
a) remove trailing spaces on the CLIENTVERSION command line in the passive.cfg, also make sure there is a blank line at the end of the file,
b) add the string to compare in this case it would be NC_Net 4.1a 03/30/07
CLIENTVERSION[tab]CLIENTVERSION[tab]-l[tab]NC_Net 4.1a 03/30/07
then passive.log shows
2007-10-15 13:31:03 Passive checks Started.
2007-10-15 13:31:03 All Passive checks Done: Now Sending to NSCA
2007-10-15 13:31:03 Passive check Output Count:1
:yahoon: :CLIENTVERSION: :0: :NC_Net 4.1a 03/30/07:
then everything goes well.
of course,you'd better make tests by yourself,and correct the bug if necessary.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I follow the steps in "Passive Checks Simplified.htm" :
fisrt, install NC_Net_V4.1a_setup.zip
second,Modify startup.cfg (as a minimum modify the following variables)
ip_passive - change this to the IP address of the NSCA/Nagios server.
interval_passive - change this to the number of minutes between passive checks.
interval_passive_div = this is a divisor for the interval (an interval of 5 with a divisor of 2, then checks are run every 2.5 min)
host_passive - change this to the Host name for this server in Nagios.(default is the Computer name from WMI)
Set passive_alwayson if you want Passive checks to stay on after an NSCA failure.
set embeded_send_nsca to true
Set passive_check to true. (this is the master ON/OF for Passive checks
third,Modify passive.cfg,I just add this line to the file:
CLIENTVERSION CLIENTVERSION
then I start NC_Net service.
in my nagios 2.9, i add to services.cfg bellow
define service{
host_name yahoon
service_description CLIENTVERSION
check_command service-is-stale
max_check_attempts 5
normal_check_interval 3
retry_check_interval 2
check_period 24x7
notification_interval 10
notification_period 24x7
notification_options w,u,c,r
contact_groups sagroup
check_freshness 1
freshness_threshold 300
}
erverything goes well.The passive.log shows
2007-10-12 14:04:15 Passive checks Started.
2007-10-12 14:04:15 All Passive checks Done: Now Sending to NSCA
2007-10-12 14:04:15 Passive check Output Count:1
:yahoon: :CLIENTVERSION: :2: :NC_Net 4.1a 03/30/07:
and the nagios.log shows
[1192167424] EXTERNAL COMMAND: PROCESS_SERVICE_CHECK_RESULT;yahoon;CLIENTVERSION;2;NC_Net 4.1a 03/30/07
[1192167434] SERVICE ALERT: yahoon;CLIENTVERSION;CRITICAL;HARD;5;NC_Net 4.1a 03/30/07
i know the nagios get the checks results from NC_Net,but seems that it take the string as wrong format.
with a normal condition,there must be an "OK" in the header of results.I don't know why NC_Net doesn't give,then all the check results will be critical,because nagios didn't understand it.
Nagios does not need an OK in the output.
Nagios uses the return code to determine 0 OK, 1 WARNING,2 CRITICAL ,3 UNKNOWN.
The OK is just a standard on many check- types.
However NC_Net, for the most part, follows the format of the original NS_CLient that way the output would not differ from NS_Client. THis was done to preserve postprocessing that some companies may be doing.
I will have to do my own testing to verify. I think you uncovered an issue with the CLIENTVERSION passive check. Originally Clientversion always returned a OK value, However This was changed to support string comparing of the CLIENTVERSION before sending the result out. (look at "check_nc_net --help=CLIENTVERSION")
Try the following and see if it resolves the issue
a) remove trailing spaces on the CLIENTVERSION command line in the passive.cfg, also make sure there is a blank line at the end of the file,
b) add the string to compare in this case it would be NC_Net 4.1a 03/30/07
CLIENTVERSION[tab]CLIENTVERSION[tab]-l[tab]NC_Net 4.1a 03/30/07
c) it is pospible that this is a bug, but I need to check the code and do my own testing before I can validate that it was not just a configuration issue.
you can populate the passive.cfg file by using the activechecks via check_nc_net.c sometimes it is easier to use that in order tonot have to worry about extra spaces or Tabs.
i did as your advice
a) remove trailing spaces on the CLIENTVERSION command line in the passive.cfg, also make sure there is a blank line at the end of the file,
b) add the string to compare in this case it would be NC_Net 4.1a 03/30/07
CLIENTVERSION[tab]CLIENTVERSION[tab]-l[tab]NC_Net 4.1a 03/30/07
then passive.log shows
2007-10-15 13:31:03 Passive checks Started.
2007-10-15 13:31:03 All Passive checks Done: Now Sending to NSCA
2007-10-15 13:31:03 Passive check Output Count:1
:yahoon: :CLIENTVERSION: :0: :NC_Net 4.1a 03/30/07:
then everything goes well.
of course,you'd better make tests by yourself,and correct the bug if necessary.