Page 2 of 2

Re: Integration Nagios3 withServiceNow

Posted: Mon Aug 07, 2017 10:35 am
by Alex_galych
Ok, I'll try.
One more thing:
A new record appears in mysql database when I add a new host to Nagios. Then on my ServiceNow instance creates new record too and all changes apply to this record.
I want to create a new event instead of updating existed one. How can I do this?
As I understand I suiold edit file sn_ticketer.pl. What part of script do I need to edit?

Re: Integration Nagios3 withServiceNow

Posted: Mon Aug 07, 2017 12:34 pm
by bolson
Are you populating the argument variables $HOSTNAME$, $HOSTSTATE$, $SERVICESTATE$, $LONGDATETIME$, and $HOSTOUTPUT$ with actual data?

Re: Integration Nagios3 withServiceNow

Posted: Mon Aug 07, 2017 1:12 pm
by Alex_galych
They are not populating automatically now .
If I replace the argument variables to specific data, all display correct on my ServiceNow instance.

Re: Integration Nagios3 withServiceNow

Posted: Mon Aug 07, 2017 1:19 pm
by bolson
I'm not sure I understand. Are you saying that everything is working as expected now?

Re: Integration Nagios3 withServiceNow

Posted: Mon Aug 07, 2017 1:22 pm
by Alex_galych
If $HOSTNAME$, $HOSTSTATE$, $SERVICESTATE$, $LONGDATETIME$ replace to the specific data.

But empty If I run like this:

Code: Select all

./sn_ticketer.pl --page="em_event.do" --host="$HOSTNAME$" --state="$HOSTSTATE$" --category="Nagios" --short_description="$HOSTNAME$ is $SERVICESTATE$" --description="Host: $HOSTNAME$\nState: $HOSTSTATE$\nTime: $LONGDATETIME$\nDescription: $HOSTOUTPUT$\n\n"

Re: Integration Nagios3 withServiceNow

Posted: Mon Aug 07, 2017 2:26 pm
by bolson
In order for the script to work, the variables (either programmatically or at run-time need to be populated with actual data. Hostname, etc.