Announcement

Collapse
No announcement yet.

centTrapHandler-2.x ne remonte les traps que sur localhost (127.0.0.1)

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

  • centTrapHandler-2.x ne remonte les traps que sur localhost (127.0.0.1)

    Bonjour à tous

    Voila, je pars d'une install from scratch de nagios (3.4.1) + centreon (2.3.8).

    J'ai paramétré le snmp qui écoute bien sur le port 162. J'ai activé le mode debug pour avoir du verbose. La trap est bien catchée par la daemon snmptt:

    -----BEGIN LOG-----


    Variable .1.3.6.1.4.1.6876.4.3.304.0 with value Green
    Value does not appear to contain an OID

    Variable .1.3.6.1.4.1.6876.4.3.308.0 with value 3
    Value does not appear to contain an OID

    OID of received trap: .1.3.6.1.4.1.6876.4.3.0.203. Will attempt to translate to text
    Translated to .iso
    EXEC command:/usr/local/centreon/bin/centTrapHandler-2.x 127.0.0.1 127.0.0.1 .1.3.6.1.4.1.6876.4.3.0.203 "This notification is sent on entity alarm state change, by the vCenter Server SNMP agent. '3' 'Green' 'Red' 'TEST TRAP - Event: VM starting (53051) Summary: GLPI CLONE on host 10.0.0.179 in VDA is starting Date: 06/26/13 12:57:10 User name: root VM: GLPI CLONE Host: 10.0.0.179 Resource pool: Production Data center: VDA ' 'GLPI CLONE'" "'3' 'Green' 'Red' 'TEST TRAP - Event: VM starting (53051) Summary: GLPI CLONE on host 10.0.0.179 in VDA is starting Date: 06/26/13 12:57:10 User name: root VM: GLPI CLONE Host: 10.0.0.179 Resource pool: Production Data center: VDA ' 'GLPI CLONE' "
    ********** SNMPTT v1.3 started: Wed Jun 26 15:00:06 2013 **********

    ********** Net-SNMP version 5.0403 Perl module enabled **********

    Reading trap. Current time: Wed Jun 26 15:00:06 2013
    Multi-line value detected - merging onto one line...

    Raw trap passed from snmptrapd:
    10.0.0.203
    UDP: [10.0.0.203]:58768->[10.0.0.242]
    .1.3.6.1.2.1.1.3.0 103:1:16:03.79
    .1.3.6.1.6.3.1.1.4.1.0 .1.3.6.1.4.1.6876.4.3.0.203
    .1.3.6.1.4.1.6876.4.3.308.0 3
    .1.3.6.1.4.1.6876.4.3.304.0 "Green"
    .1.3.6.1.4.1.6876.4.3.305.0 "Red"
    .1.3.6.1.4.1.6876.4.3.306.0 "TEST TRAP - Event: VM starting (53069)
    Summary: GLPI CLONE on host 10.0.0.179 in VDA is starting
    Date: 06/26/13 12:58:51
    User name: root
    VM: GLPI CLONE
    Host: 10.0.0.179
    Resource pool: Production
    Data center: VDA
    "
    .1.3.6.1.4.1.6876.4.3.307.0 "GLPI CLONE"
    .1.3.6.1.6.3.18.1.3.0 127.0.0.1
    .1.3.6.1.6.3.18.1.4.0 "public"
    .1.3.6.1.6.3.1.1.4.3.0 .1.3.6.1.4.1.6876.4.3

    Items passed from snmptrapd:
    value 0: 10.0.0.203

    value 1: 10.0.0.203

    value 2: .1.3.6.1.2.1.1.3.0

    value 3: 103:1:16:03.79

    value 4: .1.3.6.1.6.3.1.1.4.1.0

    value 5: .1.3.6.1.4.1.6876.4.3.0.203

    value 6: .1.3.6.1.4.1.6876.4.3.308.0

    value 7: 3

    value 8: .1.3.6.1.4.1.6876.4.3.304.0

    value 9: Green

    value 10: .1.3.6.1.4.1.6876.4.3.305.0

    value 11: Red

    value 12: .1.3.6.1.4.1.6876.4.3.306.0

    value 13: TEST TRAP - Event: VM starting (53069) Summary: GLPI CLONE on host 10.0.0.179 in VDA is starting Date: 06/26/13 12:58:51 User name: root VM: GLPI CLONE Host: 10.0.0.179 Resource pool: Production Data center: VDA

    value 14: .1.3.6.1.4.1.6876.4.3.307.0

    value 15: GLPI CLONE

    value 16: .1.3.6.1.6.3.18.1.3.0

    value 17: 127.0.0.1

    value 18: .1.3.6.1.6.3.18.1.4.0

    value 19: public

    value 20: .1.3.6.1.6.3.1.1.4.3.0

    value 21: .1.3.6.1.4.1.6876.4.3

    Trap received from 10.0.0.203: .1.3.6.1.4.1.6876.4.3.0.203
    0: hostname
    1: ip address
    2: uptime
    3: trapname / OID
    4: ip address from trap agent
    5: trap community string
    6: enterprise
    7: securityEngineID (snmptthandler-embedded required)
    8: securityName (snmptthandler-embedded required)
    9: contextEngineID (snmptthandler-embedded required)
    10: contextName (snmptthandler-embedded required)
    0+: passed variables

    Value 0: 10.0.0.203

    Value 1: 10.0.0.203

    Value 2: 103:1:16:03.79

    Value 3: .1.3.6.1.4.1.6876.4.3.0.203

    Value 4: 127.0.0.1

    Value 5: public

    Value 6: .1.3.6.1.4.1.6876.4.3

    Value 7:

    Value 8:

    Value 9:

    Value 10:

    Agent dns name: 127.0.0.1

    Ent Value 0 ($1): .1.3.6.1.4.1.6876.4.3.308.0=3

    Ent Value 1 ($2): .1.3.6.1.4.1.6876.4.3.304.0=Green

    Ent Value 2 ($3): .1.3.6.1.4.1.6876.4.3.305.0=Red

    Ent Value 3 ($4): .1.3.6.1.4.1.6876.4.3.306.0=TEST TRAP - Event: VM starting (53069) Summary: GLPI CLONE on host 10.0.0.179 in VDA is starting Date: 06/26/13 12:58:51 User name: root VM: GLPI CLONE Host: 10.0.0.179 Resource pool: Production Data center: VDA

    Ent Value 4 ($5): .1.3.6.1.4.1.6876.4.3.307.0=GLPI CLONE

    ...

    Finished loading configuration files

    Processing memory copy of configuration files
    339 EVENTs found
    339 EVENTs found that contain at least the mandatory FORMAT line
    Finished processing memory copy of configuration files

    Finished printing out all events in hash table
    ================================================== ========
    Exact match of trap found in EVENT hash table

    Working with EVENT entry: .1.3.6.1.4.1.6876.4.3.0.203 => vpxdAlarmInfo,Status Event,2,
    No nodes defined for this entry so all nodes will match
    No MATCH entries defined for this entry

    Trap defined, processing...



    PREEXEC line(s):


    FORMAT line:

    OID of enterprise: .1.3.6.1.4.1.6876.4.3. Will attempt to translate to text
    Translated to .iso
    0: 3
    1: Green
    2: Red
    3: TEST TRAP - Event: VM starting (53069) Summary: GLPI CLONE on host 10.0.0.179 in VDA is starting Date: 06/26/13 12:58:51 User name: root VM: GLPI CLONE Host: 10.0.0.179 Resource pool: Production Data center: VDA
    4: GLPI CLONE
    Centreon Arguments: '3' 'Green' 'Red' 'TEST TRAP - Event: VM starting (53069) Summary: GLPI CLONE on host 10.0.0.179 in VDA is starting Date: 06/26/13 12:58:51 User name: root VM: GLPI CLONE Host: 10.0.0.179 Resource pool: Production Data center: VDA ' 'GLPI CLONE'

    Variable .1.3.6.1.4.1.6876.4.3.307.0 with value GLPI CLONE
    Value does not appear to contain an OID

    Variable .1.3.6.1.4.1.6876.4.3.306.0 with value TEST TRAP - Event: VM starting (53069) Summary: GLPI CLONE on host 10.0.0.179 in VDA is starting Date: 06/26/13 12:58:51 User name: root VM: GLPI CLONE Host: 10.0.0.179 Resource pool: Production Data center: VDA
    Value appears to contain an OID or IP address.

    Variable .1.3.6.1.4.1.6876.4.3.305.0 with value Red
    Value does not appear to contain an OID

    Variable .1.3.6.1.4.1.6876.4.3.304.0 with value Green
    Value does not appear to contain an OID

    Variable .1.3.6.1.4.1.6876.4.3.308.0 with value 3
    Value does not appear to contain an OID

    OID of received trap: .1.3.6.1.4.1.6876.4.3.0.203. Will attempt to translate to text
    Translated to .iso
    This notification is sent on entity alarm state change, by the vCenter Server SNMP agent. '3' 'Green' 'Red' 'TEST TRAP - Event: VM starting (53069) Summary: GLPI CLONE on host 10.0.0.179 in VDA is starting Date: 06/26/13 12:58:51 User name: root VM: GLPI CLONE Host: 10.0.0.179 Resource pool: Production Data center: VDA ' 'GLPI CLONE'

    .1.3.6.1.4.1.6876.4.3.0.203 2 "Status Event" 127.0.0.1 - This notification is sent on entity alarm state change, by the vCenter Server SNMP agent. '3' 'Green' 'Red' 'TEST TRAP - Event: VM starting (53069) Summary: GLPI CLONE on host 10.0.0.179 in VDA is starting Date: 06/26/13 12:58:51 User name: root VM: GLPI CLONE Host: 10.0.0.179 Resource pool: Production Data center: VDA ' 'GLPI CLONE'


    EXEC line(s):
    0: 3
    1: Green
    2: Red
    3: TEST TRAP - Event: VM starting (53069) Summary: GLPI CLONE on host 10.0.0.179 in VDA is starting Date: 06/26/13 12:58:51 User name: root VM: GLPI CLONE Host: 10.0.0.179 Resource pool: Production Data center: VDA
    4: GLPI CLONE
    Centreon Arguments: '3' 'Green' 'Red' 'TEST TRAP - Event: VM starting (53069) Summary: GLPI CLONE on host 10.0.0.179 in VDA is starting Date: 06/26/13 12:58:51 User name: root VM: GLPI CLONE Host: 10.0.0.179 Resource pool: Production Data center: VDA ' 'GLPI CLONE'

    Variable .1.3.6.1.4.1.6876.4.3.307.0 with value GLPI CLONE
    Value does not appear to contain an OID

    Variable .1.3.6.1.4.1.6876.4.3.306.0 with value TEST TRAP - Event: VM starting (53069) Summary: GLPI CLONE on host 10.0.0.179 in VDA is starting Date: 06/26/13 12:58:51 User name: root VM: GLPI CLONE Host: 10.0.0.179 Resource pool: Production Data center: VDA
    Value appears to contain an OID or IP address.

    Variable .1.3.6.1.4.1.6876.4.3.305.0 with value Red
    Value does not appear to contain an OID

    Variable .1.3.6.1.4.1.6876.4.3.304.0 with value Green
    Value does not appear to contain an OID

    Variable .1.3.6.1.4.1.6876.4.3.308.0 with value 3
    Value does not appear to contain an OID

    OID of received trap: .1.3.6.1.4.1.6876.4.3.0.203. Will attempt to translate to text
    Translated to .iso
    EXEC command:/usr/local/centreon/bin/centTrapHandler-2.x 127.0.0.1 127.0.0.1 .1.3.6.1.4.1.6876.4.3.0.203 "This notification is sent on entity alarm state change, by the vCenter Server SNMP agent. '3' 'Green' 'Red' 'TEST TRAP - Event: VM starting (53069) Summary: GLPI CLONE on host 10.0.0.179 in VDA is starting Date: 06/26/13 12:58:51 User name: root VM: GLPI CLONE Host: 10.0.0.179 Resource pool: Production Data center: VDA ' 'GLPI CLONE'" "'3' 'Green' 'Red' 'TEST TRAP - Event: VM starting (53069) Summary: GLPI CLONE on host 10.0.0.179 in VDA is starting Date: 06/26/13 12:58:51 User name: root VM: GLPI CLONE Host: 10.0.0.179 Resource pool: Production Data center: VDA ' 'GLPI CLONE' "


    -----END LOG-----


    Ce qui me pose problème est que l'IP source de la trap donnée en paramètre au centTrapHandler-2.x est 127.0.0.1... alors qu'il devrait être 10.0.0.203 ou 10.0.0.179...

    La trap ne peut donc être associée uniquement au serveur Centreon, et non pas à un autre Host...

    Je pense avoir râté quelque chose, mais je patauge.

    Une aide serait grandement appréciée
    Last edited by oublyy; 26th June 2013, 16:14.
Working...
X