Page 1 of 1

Re: Populating $LONGSERVICEOUTPUT$ into PagerDuty integratio

Posted: Fri Apr 02, 2021 10:07 am
by scottwilkerson
It is worth pointing out that $LONGSERVICEOUTPUT$ only contains the data AFTER the first line out output

If you want the full output you likely want to do something like this:

Code: Select all

/usr/share/pdagent-integrations/bin/pd-nagios -n service -k $CONTACTPAGER$ -t "$NOTIFICATIONTYPE$" -f SERVICEDESC="$SERVICEDESC$" -f SERVICESTATE="$SERVICESTATE$" -f HOSTNAME="$HOSTNAME$" -f SERVICEOUTPUT="$SERVICEOUTPUT$ $LONGSERVICEOUTPUT$"
This would make SERVICEOUTPUT shown in the JSON you showed contain both $SERVICEOUTPUT$ and $LONGSERVICEOUTPUT$

Re: Populating $LONGSERVICEOUTPUT$ into PagerDuty integratio

Posted: Thu Apr 08, 2021 12:47 pm
by scottwilkerson
enoc wrote:Amazing! Thank you.
This was exactly what resolved my issue
Great!

Locking thread