I've installed my first plugin on a Nagios server, but am having trouble getting the arguments right. I've tried some things with $ARG1$ but am essentially just flopping around.
One complication, perhaps: this plugin is supposed to run on the nagios server itself; no npre call to a remote box.
The plugin is a shell script that makes a curl call against a remote box under the hood. Typical command line use with flags would read:
my_shell_script.sh -H my.server.of.interest -P 9000 -I ./tmp/settings_file -timeout 80
(yes, it has its own '-H' flag, unrelated to nagios' hostname flag.)
Here's the skeleton I have right now. Nagios appears to think all my flags are one giant one.
define command {
command_name my_command
command_line $USER1$/my_shell_script.sh $ARG1$
}
define service {
use generic-service;
host_name {{what do I put here? This is supposed to run on the nagios box itself. My shell script is installed on it.}};
service_description some description
check_command my_command!{{what goes here?}}
}
The above is a little stripped down for readability, but that's the gist of it. It's the hostname and arguments and bits in the 'what do I put here' that are giving me trouble. I could use a nudge, and thanks for the suggestions.
[Edit] it seems the intent of my post has been misunderstood, through my own language.
When I say I 'am essentially flopping around', that comes after several attempts at using the $ARG$ macros and rearranging things in a number of ways and realizing what I was trying simply wasn't working. I intentionally put up a simplified version of my plugin code in an attempt to get a point in the right direction.