%url% not working in emails from alerts

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
paul.blackman
Posts: 5
Joined: Thu Nov 30, 2017 7:32 am

%url% not working in emails from alerts

Post 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?
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: %url% not working in emails from alerts

Post 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?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
paul.blackman
Posts: 5
Joined: Thu Nov 30, 2017 7:32 am

Re: %url% not working in emails from alerts

Post 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
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: %url% not working in emails from alerts

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
paul.blackman
Posts: 5
Joined: Thu Nov 30, 2017 7:32 am

Re: %url% not working in emails from alerts

Post 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
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: %url% not working in emails from alerts

Post by lmiltchev »

@paul.blackman Is it ok to close this topic?
Be sure to check out our Knowledgebase for helpful articles and solutions!
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: %url% not working in emails from alerts

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked