Page 1 of 1

%url% not working in emails from alerts

Posted: Thu Nov 30, 2017 9:38 am
by paul.blackman
I use the System Default config for sending emails from my alerts (not working but that's a separate issue)

The line <p>See the last %lookback% in the <a href="%url%">Nagios Log Server dashboard</a>.</p> which inserts a hyperlink with %url% loads up Nagios but all I get is a black spinning circle and the following error message

Error: could not load scripts/logserver.js. Please make sure it exists and returns a valid dashboard

For now I'm loading the queries whilst in dashboard to see results but is annoying when checking multiple emails / queries

Anyone come across this?

Re: %url% not working in emails from alerts

Posted: Thu Nov 30, 2017 2:09 pm
by npolovenko
Hello, @paul.blackman. Could you copy the whole URL hyperlink and paste it into your next post? You may remove the IP or any other sensitive information if you'd like. Also, what version of the Log Server are you running? Did you always have this problem or it started recently?

Re: %url% not working in emails from alerts

Posted: Tue Dec 05, 2017 8:00 am
by paul.blackman
Afternoon npolpvenko

I'm currently using Nagios 2.0.0, the link stopped working after I updated from 1.6.6 (I believe that was the old version)

The link from the email:
http://nagios.DOMAIN.co.uk/nagioslogser ... T08:20:40Z

This changes when opened in a browser too:
http://nagios.DOMAIN.co.uk/nagioslogser ... gs63_PQ8Ky

Re: %url% not working in emails from alerts

Posted: Tue Dec 05, 2017 3:31 pm
by cdienger
I was able to reproduce and have filed a bug regarding this with dev(task id 12798). In the meantime try:

Code: Select all

cp /var/www/html/nagioslogserver/www/app/dashboards/logserver.js /var/www/html/nagioslogserver/www/scripts/
and then modify the url slightly by changing script to scripts:

Code: Select all

http://nagios.domain.co.uk/nagioslogserver/dashboard#/dashboard/scripts/logserver.js?from=24h&a=AWANGXgnbDgs63_PQ8Ky

Re: %url% not working in emails from alerts

Posted: Wed Dec 06, 2017 8:58 am
by paul.blackman
Thank you cdienger

I have made the changes you suggested and they appear to be working!

I appreciate your help with this and will keep an eye out for future updates

Re: %url% not working in emails from alerts

Posted: Wed Dec 06, 2017 2:32 pm
by lmiltchev
@paul.blackman Is it ok to close this topic?

Re: %url% not working in emails from alerts

Posted: Wed Dec 06, 2017 2:35 pm
by npolovenko
@paul.blackman, I will close this thread for now but feel free to PM our technicians in a month or so with the task id(12798). Hopefully, this bug will be fixed in the upcoming release.