Check_ping 'you need more args' error

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
pilotmc
Posts: 21
Joined: Tue May 23, 2017 3:33 pm

Check_ping 'you need more args' error

Post by pilotmc »

Hello.

I'm having a problem with check_ping from the 2.2.1 plugins tarball. I'm getting the "you need more args" error:

Code: Select all

root@trin3:/usr/local/nagios/libexec# ./check_ping -H localhost -w 3000,80% -c 5000,100% -p 3 -vvv
CMD: 
CRITICAL - You need more args!!!
Could not open pipe: 

Code: Select all

root@trin3:/usr/local/nagios/libexec# ./check_ping -h
check_ping v2.2.1.git (nagios-plugins 2.2.1)
Copyright (c) 1999 Ethan Galstad <nagios@nagios.org>
Copyright (c) 2000-2014 Nagios Plugin Development Team
	<devel@nagios-plugins.org>
From Nagios.log:

Code: Select all

[1499281936] Nagios 4.3.2 starting... (PID=26296)
[1499281936] Local time is Wed Jul 05 12:12:16 PDT 2017
[1499281936] LOG VERSION: 2.0
[1499281936] qh: Socket '/usr/local/nagios/var/rw/nagios.qh' successfully initialized
[1499281936] qh: core query handler registered
[1499281936] nerd: Channel hostchecks registered successfully
[1499281936] nerd: Channel servicechecks registered successfully
[1499281936] nerd: Channel opathchecks registered successfully
[1499281936] nerd: Fully initialized and ready to rock!
[1499281936] wproc: Successfully registered manager as @wproc with query handler
[1499281936] wproc: Registry request: name=Core Worker 26299;pid=26299
[1499281936] wproc: Registry request: name=Core Worker 26302;pid=26302
[1499281936] wproc: Registry request: name=Core Worker 26300;pid=26300
[1499281936] wproc: Registry request: name=Core Worker 26298;pid=26298
[1499281936] wproc: Registry request: name=Core Worker 26301;pid=26301
[1499281936] wproc: Registry request: name=Core Worker 26305;pid=26305
[1499281936] wproc: Registry request: name=Core Worker 26304;pid=26304
[1499281936] wproc: Registry request: name=Core Worker 26303;pid=26303
[1499281936] wproc: Registry request: name=Core Worker 26306;pid=26306
[1499281936] Successfully launched command file worker with pid 26307
[1499281936] HOST ALERT: localhost;DOWN;SOFT;1;(No output on stdout) stderr: execvp(/usr/local/nagios/libexec/check_ping, ...) failed. errno is 2: No such file or directory
[1499281996] HOST ALERT: localhost;DOWN;SOFT;2;(No output on stdout) stderr: execvp(/usr/local/nagios/libexec/check_ping, ...) failed. errno is 2: No such file or directory
[1499282056] HOST ALERT: localhost;DOWN;SOFT;3;(No output on stdout) stderr: execvp(/usr/local/nagios/libexec/check_ping, ...) failed. errno is 2: No such file or directory
[1499282116] HOST ALERT: localhost;DOWN;SOFT;4;CRITICAL - You need more args!!!
[1499282161] HOST ALERT: localhost;DOWN;SOFT;5;CRITICAL - You need more args!!!
[1499282174] EXTERNAL COMMAND: SCHEDULE_FORCED_HOST_CHECK;localhost;1499282172
[1499282174] HOST ALERT: localhost;DOWN;SOFT;6;CRITICAL - You need more args!!!
[1499282198] HOST ALERT: localhost;DOWN;SOFT;7;CRITICAL - You need more args!!!
[1499282236] HOST ALERT: localhost;DOWN;SOFT;8;CRITICAL - You need more args!!!
[1499282273] SERVICE ALERT: localhost;Current Load;OK;SOFT;2;OK - load average: 0.05, 0.16, 0.13
[1499282273] HOST ALERT: localhost;DOWN;SOFT;9;CRITICAL - You need more args!!!
[1499282311] SERVICE ALERT: localhost;Current Users;OK;SOFT;2;USERS OK - 1 users currently logged in
[1499282311] HOST ALERT: localhost;DOWN;HARD;10;CRITICAL - You need more args!!!
[1499282311] HOST NOTIFICATION: nagiosadmin;localhost;DOWN;notify-host-by-email;CRITICAL - You need more args!!!
[1499282348] SERVICE ALERT: localhost;HTTP;OK;SOFT;2;HTTP OK: HTTP/1.1 200 OK - 279 bytes in 0.001 second response time
[1499282386] SERVICE ALERT: localhost;PING;UNKNOWN;HARD;2;CRITICAL - You need more args!!!
[1499285130] Caught SIGTERM, shutting down...
[1499285130] Successfully shutdown... (PID=26296)
OS: Debian 8.8 container (under Proxmox 4), dist-upgraded recently
Nagios Core: 4.3.2 (built from source)
Plugins: 2.2.1 (built from source)

Here's what I've done so far:
1) tried ping as nagios and root user (same result)
2) Checked ulimit (it's unlimited)
3) checked logs (found nothing)
4) tried running the command against other hosts

I've noticed that even with the -vvv switch CMD: comes back as empty.
Other answers I've read suggest either the perms are wrong, ulimit is not high enough, or it's an old version. None of those are the case.
I can switch to check_icmp for host checking, but I'd rather figure out why check_ping won't work on this sytem.
Any ideas?
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Check_ping 'you need more args' error

Post by tgriep »

The check_ping plugin when it runs, shells out and uses the system's ping command that is typically in the /bin folder on the system the plugin is compiled on.

Code: Select all

/bin/ping
Check that folder and see if the ping command is installed and also that the superuser bit is set on the ping command.

Also, run the following commands and post the output.

Code: Select all

ls -l /bin/ping
ping -?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked