PDA

View Full Version : Centreon 2.0: command does not fill the $USER2$ variable


peydude
1st February 2009, 18:53
Hello,

First time poster. I recently installed Centreon and I am testing it out on my dev host running Gentoo.

Problem: If I add a service to a host and the service references $USER2$ in its definition it will not get automatically populated from the host or template form.

$ARGn$ variables work but $USER2$ does not. I believe $USER1$ works as well because the error I see under Monitoring is from the command. So the command does get executed.

Example:

Running manually in a terminal:
$ ./check_centreon_snmp_memory -H 127.0.0.1 -C test
total memory used : 39% ram used : 98%, swap used 0% | used=651882496o size=1659658240o

When Centreon/Nagios runs the command:
ERROR: Description Table hrStorageType : No response from remote host '127.0.0.1'.

So the SNMP community string is not read from my host or its templates. Any ideas?

Thanks in advance.

Visu@lSt@tion
1st February 2009, 23:54
Hello,

First time poster. I recently installed Centreon and I am testing it out on my dev host running Gentoo.

Problem: If I add a service to a host and the service references $USER2$ in its definition it will not get automatically populated from the host or template form.

$ARGn$ variables work but $USER2$ does not. I believe $USER1$ works as well because the error I see under Monitoring is from the command. So the command does get executed.

Example:

Running manually in a terminal:
$ ./check_centreon_snmp_memory -H 127.0.0.1 -C test
total memory used : 39% ram used : 98%, swap used 0% | used=651882496o size=1659658240o

When Centreon/Nagios runs the command:
ERROR: Description Table hrStorageType : No response from remote host '127.0.0.1'.

So the SNMP community string is not read from my host or its templates. Any ideas?

Thanks in advance.

Perhaps an error or a white space in the $USER2$ variable ?

rbecker911
11th February 2009, 18:56
Have you solved this problem? I've run into the same thing.

Any service that requires SNMP is failing. Is there a way I can view the commands as they are executed to see if it is filling in the correct variables?

Run via command line it works, but run via Nagios I am getting the same error as OP.

-Rob

rbecker911
11th February 2009, 19:03
Found it... It doesn't look like Nagios/Centreon use the SNMP Community field that get's put in the hosts.cfg. You must define it through the resources.cfg file instead. Looks to be a global setting and not a per host.