Re: Populating $LONGSERVICEOUTPUT$ into PagerDuty integratio
Posted: Fri Apr 02, 2021 10:07 am
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:
This would make SERVICEOUTPUT shown in the JSON you showed contain both $SERVICEOUTPUT$ and $LONGSERVICEOUTPUT$
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$"