Email Notifications - Not displaying all lines of output

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
scomdco
Posts: 45
Joined: Fri Oct 04, 2019 3:18 pm

Email Notifications - Not displaying all lines of output

Post by scomdco »

Hey Nagios,

How can i have all of the output from a service check be displayed within the associated email notification as well?

sensitive information has been redacted:

Here's the service check when viewing it within the GUI, when viewing the specific check you can see more lines than just the bolded one
InkedAnnotation 2020-09-17 130746_LI.jpg
Here's the email notification, it ONLY shows the bolded line, i want to have ALL the output be provided in the email notification, please advise
InkedAnnotation 2020-09-17 130747_LI.jpg
Also, would you mind providing updated commands for the ones provided in the linked ticket below? since 5.7 upgrade the first one doesn't work, and i'm not sure if the other ones are either, i'm assuming this may be due to the DB change in 5.7:

Code: Select all

echo "desc nagios_servicestatus;"|mysql -pnagiosxi nagios|grep output

echo "use nagios;alter table nagios_servicestatus modify output varchar(65535) not null;alter table nagios_servicestatus modify long_output TEXT not null;alter table nagios_servicestatus modify perfdata TEXT not null;" | mysql -pnagiosxi

echo "use nagios;alter table nagios_hoststatus modify output varchar(65535) not null;alter table nagios_hoststatus modify long_output TEXT not null;alter table nagios_hoststatus modify perfdata TEXT not null;" | mysql -pnagiosxi

echo "use nagios;alter table nagios_servicechecks modify output varchar(65535) not null;alter table nagios_servicechecks modify long_output TEXT not null;alter table nagios_servicechecks modify perfdata TEXT not null;" | mysql -pnagiosxi

echo "use nagios;alter table nagios_hostchecks modify output varchar(65535) not null;alter table nagios_hostchecks modify long_output TEXT not null;alter table nagios_hostchecks modify perfdata TEXT not null;" | mysql -pnagiosxi
Here's the locked thread where y'all helped me out prior. Since the 5.7 upgrade they do not seem to be resolving the issue anymore https://support.nagios.com/forum/viewto ... 16&t=56569
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Email Notifications - Not displaying all lines of output

Post by scottwilkerson »

The output below the main line is a seperate macro that needs to be added to the email template, for services it is %longserviceoutput% for hosts it is %longhostoutput%


Here's some info on modifying email templates
https://assets.nagios.com/downloads/nag ... iables.pdf
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
scomdco
Posts: 45
Joined: Fri Oct 04, 2019 3:18 pm

Re: Email Notifications - Not displaying all lines of output

Post by scomdco »

Using %longserviceoutput% and %longhostoutput% worked, thank you for your assitance!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Email Notifications - Not displaying all lines of output

Post by scottwilkerson »

scomdco wrote:Using %longserviceoutput% and %longhostoutput% worked, thank you for your assitance!
Great!

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked