Solved

Set/Write OID Values

  • 25 February 2022
  • 1 reply
  • 233 views

Badge +1

Hi,

Can i set or write an OID with centreon?

For example, every 15 minutes set an oid to 1 from 0. (Push button via web).

 

Thanks for your reply.

icon

Best answer by tcharles 1 March 2022, 13:05

View original

1 reply

Userlevel 2
Badge +5

Hello,

First thing to ask is not can you, but should you.

I’m going to tell you why you shouldn’t and then I’ll explain how you can achieve that. 

 

Why you shouldn’t

Monitoring servers should never have write access to any monitored device. This is a matter of security. Never use an admin or any kind of root access to monitore something (best example is databases monitoring, it only needs a user with read only permissions)

 

How to

you can easily create a small script that is going to do what you want. Then you create a command in Centreon and a service that will use said command and the generic-active-service-custom template. Link your service to your host in Centreon. Make sure your service has a check interval of 15 minutes and that’s it. Every 15 minutes Centreon si going to run your script. 

This was the automated way to do it. Now, let’s take a look at your “push button” idea. There is no such a thing in Centreon but there is a little trick that can be used to get it working like that

Remember the service with the generic-active-service-custom template, use the generic-passive-service-custom template instead and remove your check interval that was set before. 

You have now a service that will never be activated unless you manually schedule a check using the scheduled check (forced) button when selecting your service in your monitoring

 

Have a nice day,

Regards

Reply