Hi All,
Could anybody help to me the following problem:
i would like to use the defined variables at the host in the command:
Command: check_nrpe -H 10.31.52.31 -c CheckProcState -a MaxCritCount=$HOSTMAXJAVAW$ frmweb.exe=started
The HOSTMAXJAVAW -> value is in the host: 50
Result is:
COMMAND: /usr/local/nagios/libexec/check_nrpe -H xxx.xxx.xxx.xxx -c CheckProcState -a MaxCritCount=\$HOSTMAXJAVAW\$ frmweb.exe=started
OUTPUT: CHECK_NRPE: No output returned from daemon.
it looks like the nagios cannot change the variable to the value.\
Regards, Zsolt
Custom Variable values issue
Re: Custom Variable values issue
How are you defining the variable on the host config? Could you post the full host config?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Custom Variable values issue
Hi,
This is the host config:
define host {
host_name FR-V-WIN-RA-MOP-APP01
alias Opera Application Server
address 10.31.52.31
hostgroups Opera Application Servers - Windows,Windows Servers
max_check_attempts 3
icon_image win_server.png
statusmap_image win_server.png
_MAXJAVAW 200
register 1
}
Regards, Zsolt
This is the host config:
define host {
host_name FR-V-WIN-RA-MOP-APP01
alias Opera Application Server
address 10.31.52.31
hostgroups Opera Application Servers - Windows,Windows Servers
max_check_attempts 3
icon_image win_server.png
statusmap_image win_server.png
_MAXJAVAW 200
register 1
}
Regards, Zsolt
Re: Custom Variable values issue
Does the check itself work when run as normally scheduled? You may have issues using USER or CUSTOM macros from the test check command.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Custom Variable values issue
Hi,
When I changed the variable to the number it works.
I tried only the variables in the host. So if I try to change to the variable it doesn't work.
I've read the lots of forums topic, and it should be work.
Regards, Zsolt
When I changed the variable to the number it works.
I tried only the variables in the host. So if I try to change to the variable it doesn't work.
I've read the lots of forums topic, and it should be work.
Regards, Zsolt
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Custom Variable values issue
You are not referencing the variable correctly. It needs to be referenced as $_HOSTMAXJAVAW$zkarman wrote:check_nrpe -H 10.31.52.31 -c CheckProcState -a MaxCritCount=$HOSTMAXJAVAW$ frmweb.exe=started
Code: Select all
check_nrpe -H 10.31.52.31 -c CheckProcState -a MaxCritCount=$_HOSTMAXJAVAW$ frmweb.exe=startedAs of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Custom Variable values issue
Hi,
I found the issue. I've already tried with _ and without as well.
The issue is when I tried to test via -> create service -> test command -> this is not working just if i saved it.
Do you know what is the reason?
Rgs, Zsolt
I found the issue. I've already tried with _ and without as well.
The issue is when I tried to test via -> create service -> test command -> this is not working just if i saved it.
Do you know what is the reason?
Rgs, Zsolt
Re: Custom Variable values issue
The test check command does not populate user macros/custom variables as the test runs as user apache (for security reasons). The apache user does not have access to the necessary environment variables to run a test check with custom/user macros.
Can we lock the thread?
Can we lock the thread?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Custom Variable values issue
Hi,
You can close this "case".
Regards, Zsolt
You can close this "case".
Regards, Zsolt