Skip to main content

So i’m trying to set up a Centreon server (version 22) and i want to use SNMPv3 but i don’t understand how i’m supposed to use it.

I want to use the Auth Priv mode but when i want to add a host it doesn’t prompt me with a “username / password” or anything, it’s just the community and the version.

I can’t find any documentation about SNMPv3 with Centreon (apart from the “discovery” part but that’s with the paid license)

Hi,

As you indicate that you don’t have a licence I suppose you’re not using Centreon Plugin Packs, and thus, doesn’t have Centreon host templates and commands.

So yes, it’s only possible to indicate the community and the version here at the host creation.

What you have to do, is to define a command with the needed macros for SNMP username, authentication key and other SNMPv3 parameters. And optionally a host template with such macros.

In the commands and host templates provided by Centreon when you have a commercial licence, there is not one macro for each SNMPv3 parameter, but only one macro called $_HOSTSNMPEXTRAOPTIONS$. You can do the same, but I think it’s better to have different macros, so you can protect (ie: hide) some and not anothers. For example, you may want to have SNMPv3 username and protocols unprotected, but authentication and encryption keys protected.


I would point out that having “3” in the drop-down list for SNMP version, while not also having the required parameters for SNMPv3, makes absolutely no sens.

As I said above, it would have been nice to have separate macros instead of just a “HOSTSNMPEXTRAOPTIONS” in the commands/templates provided with Centreon but I guess it’s now too late for this, as it would break things. But maybe something to have for new packs?

Personally I duplicate the templates/commands to have SNMPv3 compatible ones with separate macro, as I’d like not having to remember and retype all the other parameters when I just need to change the keys (which is what one must do when it’s the whole HOSTSNMPEXTRAOPTIONSS which is protected).


Thank you for the answers, i have never edited or created custom macros in Centreon before.

Do you have any documentation that you found particularly useful when you began to make those that you could share here ? I will take any documentation you find useful actually.


https://docs.centreon.com/docs/monitoring/basic-objects/macros/

In short : Host custom macros have this form : $_HOST…$ et service custom macros this form $_SERVICE…$


Reply