Announcement

Collapse
No announcement yet.

community variable problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • community variable problem

    Hello,

    I have just installed a fresh centreon on my debian Squeeze.
    It runs smoothly with nagios3 and I can braowse the interface, create hosts and services etc...

    The problem appear when I try using an snmp v2 check (for exemple xentreon_snmp_remote_storage)... the snmp query sent by centreon (well... by nagios with config files generated by centreon) is indeed an snmp v2c query but without any community! At least this is what isee using tcpdump.
    Here is how I did:

    1- create hostTemplate without specifying community nor snmp version.
    2- Add the SNMP-Linux-Swap service template as a relation to the host template (for example)
    3- create a host using that host template and specifying snmp v2c and community name.
    4- I go the servicebyhost page and customize my service for this host in order to make it use snmp v2c (change the last argument from 1 to 2)

    As a result I get for the Memory swap test:
    Code:
     Disk CRITICAL - no output (-p number expected... it doesn't exist, try another disk number)
    tcpdump shows no community:
    Code:
     { SNMPv2c { GetRequest(81) R=50582  .1.3.6.1.2.1.25.2.3.1.3.10
    Then If i go to the service again and change $USER2$ to the community string itself... it works ok...

    I gess this is not the normal behaviour, so... what did I miss?

    P.S: the same happens when checking / partition or when trying to get interface traffic.

  • #2
    $USER2$ should be configured in config/nagios/ressource
    https://x.x.x.x/centreon/main.php?p=60704
    Intel(R) Xeon(TM) CPU 3.4GHz - MemTotal : 1034476 kB
    Centreon 2.4.1 - Nagios 3.2.1 - Nagios Plugins 1.4.15 - Manubulon Plugins tuné
    Fedora Core 5 - 2.6.20-1.2320

    Comment


    • #3
      Indeed after I defined $user2$ in the resource config page the variable gets correctly assigned but I am quite disapointed as I thought $USER2$ was automaticly expanded to the community of the host centreo nis checking...

      Comment


      • #4
        $USERx$ variables are used to store anything you find usefull to store in.
        I put generally generic password/community and paths in this variables.

        Maybe there is another variables who correspond to the host community.
        I find this variable : $_HOSTSNMPCOMMUNITY$
        Try to replace $USER2$ by this
        Intel(R) Xeon(TM) CPU 3.4GHz - MemTotal : 1034476 kB
        Centreon 2.4.1 - Nagios 3.2.1 - Nagios Plugins 1.4.15 - Manubulon Plugins tuné
        Fedora Core 5 - 2.6.20-1.2320

        Comment


        • #5
          yep this is pricesly what i did and of course it works a lot better...
          The only question I have now is: why the hell commands that uses snmp are not built that way buy default.... putting default commands that certainly won't match end users plate-form is IMHO far worth than puuting no default commands.

          !by the way... my centreon is all green now. I feel better thx DonKiShoot

          Comment

          Working...
          X