Login

Home Forum
Welcome, Guest
Please Login or Register.    Lost Password?

checkcommands.cfg command with no variables
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: checkcommands.cfg command with no variables
#1304
checkcommands.cfg command with no variables 7 Months, 2 Weeks ago Karma: 0
Hi, first thing first, very good work !

May I ask you the following:

In my checkcommands.cfg I have few entries like the following:

define command{
command_name checkUPSupsOutputVoltage8marc_1
command_line /usr/local/nagios3/libexec/check_snmp -H 192.168.108.23 -C syslogsrv -P 1 -o mib-2.33.1.4.4.1.2.1 -w 210:235 -c 200:240
}

For various reasons I do not use in this case the variables like $HOST $ARG etc...

The command above will not show in the list of the available commands, I do see the point, the system correctly checks where is used.

If I insert for example the $HOSTADDRESS and at least one $ARG1 variable the command does appear on the commend list


Would it be possibile an option where one could disable the "control check" feature ?

Thank you for your time
Giovanni
triotech
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#1305
Re:checkcommands.cfg command with no variables 7 Months, 2 Weeks ago Karma: 4
I think I don't exactly understand this issue.

Have you imported your commands to NagiosQL? Are the commands listed below the menu point "Commands"?

In "Commands" you can simple add a copy of any command with less arguments.

If a command is not shown in the command listbox of your host and service configuration, probably this command is not marked as "check command". Use the command secrion to change this.
martin
NagiosQL Founder
Posts: 303
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#1306
Re:checkcommands.cfg command with no variables 7 Months, 2 Weeks ago Karma: 0
I am sorry, I'll try to explain myself better.

The command is the one that I have pasted in the previous post, it normally works, no problems in Nagios or in NagiosQL when imported, no errors.

Even if all is OK this specific command will not show in the list Check Command of available commands in NagiosQL for example when you add a new host.

After few tests I have found that the issue was in the way that the specific command has been written without the use of the standard variables like $HOSTADDRESS or ARG$1 etc..

You can try this your self. Import the file checkcommands.cfg attached to this post, than try to add an host for example, you'll see that all of the commands that have no variables ($xxxx) will not be listed.

Look at the last two lines, I have inserted two command ending with A and B, they are the same thing but B use the variables and does get shown in the list.

I am wondering if in NagiosQL is meant to work this way.

Thank you for your time,
Regards

Giovanni
triotech
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#1307
Re:checkcommands.cfg command with no variables 7 Months, 2 Weeks ago Karma: 0
Sorry there was an error while sending the file
This attachment is hidden for guests. Please login or register to see it.
triotech
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2009/12/16 12:34 By triotech.Reason: sendind file again
The administrator has disabled public write access.
 
#1308
Re:checkcommands.cfg command with no variables 7 Months, 2 Weeks ago Karma: 4
To make a command visible in that list, you have to mark them as "check command" in the command definition. This definition is not written out to the cfg file and not imported - it is a NagiosQL inside flag.

NagiosQL is trying to find out during import if a command should be a misc or a check command and will set the correct flag. But this does not work in any cases. The name of a command is irrelevant.

Look at the attached image.
This image is hidden for guests. Please login or register to see it.
martin
NagiosQL Founder
Posts: 303
graph
User Offline Click here to see the profile of this user
Last Edit: 2009/12/17 08:52 By martin.
The administrator has disabled public write access.
 
#1309
Re:checkcommands.cfg command with no variables 7 Months, 2 Weeks ago Karma: 0
OK, I did not notice the option you mention

Thank for your prompt reply, execellent service

Giovanni
triotech
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1