Page 1 of 1

Trying to use Macro in oracle query

Posted: Thu Mar 11, 2021 1:32 pm
by btayl
trying to use a Macro for username and password and get the following error

CRITICAL - cannot connect to schp.mcit.med.umich.edu:1521/schp.world. ORA-01017: invalid username/password: logon denied (DBD ERROR: OCISessionBegin)

This is what I did for the username and password

--username $user12$ --password $user13$

Re: Trying to use Macro in oracle query

Posted: Fri Mar 12, 2021 11:59 am
by benjaminsmith
Hi,

That should work. Did you re-start Nagios core after adding those to /usr/local/nagios/etc/resource.cfg?.

Code: Select all

systemctl restart nagios
Did you define the macros as uppercase or lowercase, make sure that matches as its case sensitive? As a matter of convention, they are normally uppercase.

Documentation: https://assets.nagios.com/downloads/nag ... ponent.pdf

Re: Trying to use Macro in oracle query

Posted: Sat Mar 13, 2021 6:10 am
by btayl
I changed the Macro to uppercase and now it works just fine

Re: Trying to use Macro in oracle query

Posted: Mon Mar 15, 2021 11:06 am
by benjaminsmith
Hi,

Glad that took care of it.

We'll go ahead a close this topic, but feel free to open another ticket if have any new issues.

--Benjamin