Solved

SNMP TRAP is pending until trap is sent

  • 18 January 2024
  • 42 replies
  • 307 views

Badge +4

I don't know if this is normal, but the services to which SNMP traps are connected remain pending until the traps are sent from the device. I have triggered the traps manually. After that everything works perfectly, the services go into the critical state and then into the OK state and stay there until a trap is sent again.

icon

Best answer by vcoum 18 January 2024, 14:29

View original

42 replies

Userlevel 5
Badge +11

Hello @query ,
It's normal 
If i assume correctly, the services who receives traps use the generic-passive-service-custom template (or a similar one), right?

Pending status means the service wait for a status to be set, with active (check command) or passive (trap) checks

In this template, active checks are disabled, even if it has a check command defined by the template (App-Monitoring-Centreon-Service-Dummy). So no check command will be used by Centreon to define the status with the command. It will stay on Pending status until a trap is sent


Second assumption, when your services goes to OK status, it's when you acknowledge them?
It's because, by default, acknowledgment force active checks. So it will execute "App-Monitoring-Centreon-Service-Dummy" command, wich set status to OK (by default)

I don't know if my assumption are correct in your case, but i hope it helps you to figure out

Regards

Badge +4

Hello @vcoum,

Thank you for your information. Here is some more insight.

I use the generic-passiv-serivce-custom-template. The service goes to OK Status when I do a forced check.

How can I make it possible that the service goes to OK Status by default. Should I activate passive check (it is currently on default)?

Userlevel 5
Badge +11

You can enable active checks on the services, Centreon will execute the command periodically 

But it will messed with the lisibility of your alerts 

IMO your best option it’s to manually force checks to the Pending services 

Badge +4

Wich command should it execute? It is a TRAP.

Badge +4

You're pretty well informed. Do you know if Centreon support receiving SNMP Informs? I can't find any information on this.

Userlevel 5
Badge +11

It will execute App-Monitoring-Centreon-Service-Dummy command, which is set on the service template

Your services status will be set by the traps sent, but if you force Active checks,Centreon will use this command to set status (but your services status can still be changed by Traps)

Active checks are disabled on the template, so it will execute this command only if you force it

Userlevel 5
Badge +11

You're pretty well informed. Do you know if Centreon support receiving SNMP Informs? I can't find any information on this.

Sorry i don’t have information on this :/ 

Badge +4

But theoretically I could change this dummy command by a self-selected one in the circled area in the picture. Do have a source for  App-Monitoring-Centreon-Service-Dummy command?

Userlevel 5
Badge +11

Yes you could change this command, but you will still need to force checks, unless you enable active checks (but for me it’s not a good idea)

The App-Monitoring-Centreon-Service-Dummy is set on the parent template used by generic-passive-serivce-custom, which is...generic-passive-serivce

This is the actual command

 

Badge +4

I understand. One other question: What is the difference between those custom templates and “normal” templates? Like generic-passive-service-custom and generic-passive-service. 

Userlevel 5
Badge +11

The “normal” templates are used as base to “custom” templates

You can’t edit “normal” templates because they are locked, to keep them functionnal

The custom templates can be edited, to put some custom settings to match your needs

 

Concretly you can use both, it will make no difference, unless you edited the customs templates

Badge +4

Sorry to ask you again @vcoum,

Do you now if it possible to link a host template to a group or category? If I add a host to this group it gets the template. Thank you for your answer

Userlevel 5
Badge +11

No worries @query  !

AFAIK you can link hosts and services templates to a category, but it’s more like every hosts/services which use the templates linked to a category will be on this category

You can’t set a template by just link a host/service to a group/category

But you can list all member of a host group from Configuration > Hosts > Hosts and do a massive change to the members to apply your template

 

Badge +4

Thank you,

I have one more questions. The thresholds for warnings and services what do they mean. For example in the picture for generic pinging. What do 200,20% and 400,50% reference?

or this picture shows the service for traffic of interface 14. What does 80 and 90 mean.

 Thank you very much

Userlevel 5
Badge +11

The Ping Threshold values are for response time (in ms) and packet loss

For example the warning threshold is 200,20% . This mean that if the ping has a response time superior to 200ms OR 20% of packet loss, the service will be set to the Warning status

For the Aruba template, i guess it’s the percentage of traffic (in and out) on the interfaces

 

Badge +4

How would you do the following? I have two switches and would like to monitor the traffic of the ports. With the Centreon function “Scan”  I get all ports and can add them as a service. Then I would like to have all port-services of a switch in a separate service group. Can this be done automatically because both switches have exactly the same template?

Userlevel 5
Badge +11

You want to put the port services in a separate service group for each switch? Like one service group per switch?

Or one service group with all port services ?

Badge +4

one service group per switch

Userlevel 5
Badge +11

I don’t think it’s possible from Centreon UI

But maybe you can create a script that will:

  • Checks if a port service group exist for the concerned switch
  • Creates it if not
  • Adds all the port service of the switch to the right service group (based on the service template AND the linked host)

And put this script on the crontab of the Central server, so it will be executed automatically 

This tasks can be done using the Centreon API, or some CLI tools that will helps you (like CentCTL or CLAPI)

 

Badge +4

Hello @vcoum,

I have a problem. I have created the service in the picture to monitor the traffic of interface 1 of a switch.

 

However, Centreon outputs the following for the service:

“CRITICAL: Interface '1' Status : down (admin: up)

Interface '1' Status : up (admin: up), Traffic In : 37.02Kb/s (0.00%), Traffic Out : 119.34Kb/s (0.01%)

Interface '1' Status : down (admin: up)”

The second line contains the right status (up). But Centreon uses the first line to decide the status of the service which is false. How could I use the second line? And why does centreon even output that the status of interface 1 is down?

 

Userlevel 5
Badge +11

Hello @query 

I’m sorry i don’t know why your plugin return you 2 interfaces with different status, and i don’t have Aruba switch for testing :/

You should try to create another topic dedicated to your problem

Maybe someone got this problem too, and if it’s a bug, it’s will be easier for Centreon staff to check the existence of this bug

 

Badge +4

Hello @vcoum,

I have another question. It is about inheritance.

I created this host-template with a non-default check interval and non-default notification-interval.

Then I linked several services to it. After that I created the Host Aruba Coreswitch.

However, like you can see in the third picture the check-interval is for every service the default one. I expected that the host-template values are inherited by the services. Is this normal? Or is the host-template too “far away” from the service for inheritance? 

Thank you very much for your help

Userlevel 5
Badge +11

Hello @query 

AFAIK Service scheduling configuration is inherited from service template, not from host, so yes it’s normal

You need to configure the scheduling on your services templates

Badge +4

Hello @vcoum,

Thank you very much. Where do you get this information? I need to know because I rely heavily on inheritance. Is it the same for notification scheduling and activating active and passive checks?

Badge +4

If you look under the section “template inheritance rule”, they say it is possible. The link is Configuring notifications | Centreon Documentation

Reply