Page 1 of 1

Getting error while trying to enable CPU/Memory via OID

Posted: Thu Feb 11, 2021 8:51 am
by pratikmehta003
HI There,

We have some Comware and Aruba switches to be added and Nagios is not picking CPU/Memory by default, we need to define the OID..
So i tested from CLI for the OID and i can see the output like this:
SNMPv2-SMI::enterprises.25506.2.6.1.1.1.1.6.14 = INTEGER: 8

Now i took the SNMP wizard and defined the OID and everything.. but the status is showing like below:
error1.PNG
below is snap from CCM:
Error2.PNG

Re: Getting error while trying to enable CPU/Memory via OID

Posted: Thu Feb 11, 2021 6:33 pm
by ssax
This is likely related to having a ! in your passwords which is used on the backend to separate the arguments.

You can setup a user macro and use that in the command like this (leave the single quotes around it):

Code: Select all

--authpasswd='$USERn$' --privpasswd='$USERn$'
https://assets.nagios.com/downloads/nag ... Macros.pdf

If you need help, please PM me a copy of your profile.zip, you can download it from Admin > System Profile by clicking the Download Profile button.

Re: Getting error while trying to enable CPU/Memory via OID

Posted: Fri Feb 12, 2021 11:19 am
by pratikmehta003
Hi,

Yes ! character is there in the pwd.. but is there no way to bypass it? We had this instance in other customers also but it worked when everything was kept in 1 line...

i will check the macro as well.. and we come across this randomly with some other commands as well.. Is there any format or doc that shoyld be followed?

Re: Getting error while trying to enable CPU/Memory via OID

Posted: Fri Feb 12, 2021 11:50 am
by pratikmehta003
I used the Macro but still no help.

See below the defined macro in the config file:
macro.PNG
and the output below after trying:
error.PNG

Re: Getting error while trying to enable CPU/Memory via OID

Posted: Fri Feb 12, 2021 9:03 pm
by ssax
Try putting single quotes around both of the user macros then try again. Also, try applying configuration and forcing a check to see if it works from the backend after.

Code: Select all

'$USERn$'

Re: Getting error while trying to enable CPU/Memory via OID

Posted: Sat Feb 13, 2021 1:51 am
by pratikmehta003
You mean in config file or in CCM for single quotes?

Re: Getting error while trying to enable CPU/Memory via OID

Posted: Sat Feb 13, 2021 4:50 am
by pratikmehta003
Its working now.. Thanks for the help...

I have one more query, if u fine then can i ask here?

Re: Getting error while trying to enable CPU/Memory via OID

Posted: Mon Feb 15, 2021 9:36 am
by scottwilkerson
pratikmehta003 wrote:Its working now.. Thanks for the help...

I have one more query, if u fine then can i ask here?
Great!

It would be better to create a new thread for another question/issue

Locking thread