Hi ,
I am using 0.3.8 nclient version and i have defined below command , but when i execute this command from nagios i am getting below error.
[/settings/external scripts/alias]
check_all_other_drives = CheckDriveSize CheckAllOthers FilterType=FIXED MinWarn=$ARG1$ MinCrit=$ARG2$ Drive=C
[/settings/NRPE/server]
allow arguments = true
allow nasty characters = true
From nagios:-
NRPE: Command 'check_all_other_drives' not defined
2. Please let me know how to monitor system uptime using check_uptime in nsclient++ and passing threshold in minutes.
NRPE: Command 'check_all_other_drives' not defined
Re: NRPE: Command 'check_all_other_drives' not defined
To check your Windows system from the Nagios server, you would use the check_nrpe plugin to connect to the Windows system and that check would pass the command/arguments for the check_all_other_drives. Here is how you would do this.
In your commands.cfg file, you will need to have the check_nrpe command defined as follows
Your service check for all other drives would be defined like this
On your second question about uptime, you want to monitor the uptime of a windows system?
The check_uptime plugin will not work for this but there is a built in uptime check in the NSClient++.
On your Nagios system you could use the following command to do that.
In your commands.cfg file, you will need to have the check_nrpe command defined as follows
Code: Select all
define command {
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
}
Code: Select all
check_command check_nrpe!check_all_other_drives!-a 80 90!!!!!!
The check_uptime plugin will not work for this but there is a built in uptime check in the NSClient++.
On your Nagios system you could use the following command to do that.
Code: Select all
check_nt -H <IP Address> -p 12489 -v UPTIME
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: NRPE: Command 'check_all_other_drives' not defined
Hi,
I have modified the ini file below and executed check_nrpe from nagios , however i am getting below error.
on ini file:-
check_uptime_boot = checkuptime MinCrit=$ARG1$
root@xxxx libexec]# ./check_nrpe -H xxxxxxx -c check_uptime_boot -a 12m
Invalid command line: unrecognised option 'MinCrit=12m'
help Show help screen (this screen)
help-pb Show help screen as a protocol buffer payload
show-default Show default values for a given command
help-short Show help screen (short format).
debug Show debugging information in the log
show-all Show debugging information in the log
filter= Filter which marks interesting items.
warning=uptime < 2d Filter which marks items which generates a warning state.
warn= Short alias for warning
critical=uptime < 1d Filter which marks items which generates a critical state.
crit= Short alias for critical.
ok= Filter which marks items which generates an ok state.
empty-state=ignored Return status to use when nothing matched filter.
perf-config= Performance data generation configuration
top-syntax=${status}: ${list} Top level syntax.
ok-syntax= ok syntax.
empty-syntax= Empty syntax.
detail-syntax=uptime: ${uptime}h, boot: ${boot} (UTC) Det
But if i execute the same command on windows server it is working fine . please let me know where i am going wrong
checkuptime MinCrit=12h
D w32system Created command: crit=uptime<=12h
C:\Program Files\NSClient++/nsclient.log could not be opened, Discarding: debug
Created command: crit=uptime<=12h
L cli CRITICAL: CRITICAL: uptime: 10:40h, boot: 2015-Jun-26 09:50:58 (UT
)
I have modified the ini file below and executed check_nrpe from nagios , however i am getting below error.
on ini file:-
check_uptime_boot = checkuptime MinCrit=$ARG1$
root@xxxx libexec]# ./check_nrpe -H xxxxxxx -c check_uptime_boot -a 12m
Invalid command line: unrecognised option 'MinCrit=12m'
help Show help screen (this screen)
help-pb Show help screen as a protocol buffer payload
show-default Show default values for a given command
help-short Show help screen (short format).
debug Show debugging information in the log
show-all Show debugging information in the log
filter= Filter which marks interesting items.
warning=uptime < 2d Filter which marks items which generates a warning state.
warn= Short alias for warning
critical=uptime < 1d Filter which marks items which generates a critical state.
crit= Short alias for critical.
ok= Filter which marks items which generates an ok state.
empty-state=ignored Return status to use when nothing matched filter.
perf-config= Performance data generation configuration
top-syntax=${status}: ${list} Top level syntax.
ok-syntax= ok syntax.
empty-syntax= Empty syntax.
detail-syntax=uptime: ${uptime}h, boot: ${boot} (UTC) Det
But if i execute the same command on windows server it is working fine . please let me know where i am going wrong
checkuptime MinCrit=12h
D w32system Created command: crit=uptime<=12h
C:\Program Files\NSClient++/nsclient.log could not be opened, Discarding: debug
Created command: crit=uptime<=12h
L cli CRITICAL: CRITICAL: uptime: 10:40h, boot: 2015-Jun-26 09:50:58 (UT
)
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: NRPE: Command 'check_all_other_drives' not defined
Seems to be working for me on NSClient++ 0.3.8.76:
Please post your nsc.ini file
Code: Select all
[External Alias]
check_uptime_boot = checkuptime MinCrit=$ARG1$
Code: Select all
./check_nrpe -H win2008r2-01 -c check_uptime_boot -a 12m
CRITICAL: uptime: 0:3 < critical|'uptime'=187000;0;720000;
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.