Cacti / plugin_webseer

Cacti Web Services Monitoring Plugin
GNU General Public License v2.0
8 stars 9 forks source link

Webseer opens wrong URL #25

Closed Lalbee99 closed 5 years ago

Lalbee99 commented 6 years ago

When in Web Service Checks if you choose an URL in the name column it opens a new browser page with a different URL other than the one choosen. I am running webseer version: 2.0 with Cacti version 1.1.37

hellspawndf commented 6 years ago

Same here

netniV commented 6 years ago

As I'm not running webseer currently, can you post the partial URL where you are at, plus a screenshot to help guide me to what i'm looking for?

KnoAll commented 6 years ago

Same issue for me. By 'URL where you are at' I assume you mean the URL of the page where the incorrect link is? If so... http://cacti/cacti/plugins/webseer/webseer.php The incorrect target for me is whatever the target of the last web service check you defined. Does this help?

netniV commented 6 years ago

Yes, I think I know what that problem might be.

netniV commented 5 years ago

The URL is only updated if the row['type'] is http or dns. Try doing the following for me:

SELECT type, COUNT(*) FROM plugin_webseer_urls
GROUP BY type

However, the $url field was never cleared so it means that the value was still set from a previously valid check.

netniV commented 5 years ago

Please download the latest dev version and see if this resolves your issue @Lalbee99 and @KnoAll

Lalbee99 commented 5 years ago

I installed the updated version. Where as before it would open with the wrong URL now it just opens with a Not Found message (see below)

Not Found

The requested URL /XXXXXXX/plugins/webseer/Search string not found was not found on this server.

netniV commented 5 years ago

Which column do you click on to open the link?

Lalbee99 commented 5 years ago

Under Checks The Name Field

netniV commented 5 years ago

OK, I've pushed another change up. Please download again.

Lalbee99 commented 5 years ago

You are back to the original problem where it opens the same URL regardless of which name you select

netniV commented 5 years ago

Can you perform the above SQL query for me? I'm curious as to how this is happening as it's not making much sense to me right now but that may be just because I have a headache at the moment from some other changes ;-)

Lalbee99 commented 5 years ago

MariaDB [cacti]> SELECT type, COUNT() FROM plugin_webseer_urls -> GROUP BY type -> ; +------+----------+ | type | COUNT() | +------+----------+ | http | 2 | +------+----------+ 1 row in set (0.00 sec)

MariaDB [cacti]>

netniV commented 5 years ago

So I took the plunge and installed, created two urls and replicated the issue. i'll be back later once I see what the actual issue is but it would appear that the URLs are only using the last URL found and I suspect that it is the javascript that is doing it.

netniV commented 5 years ago

OK. So, it was the javascript and I've now patched that too. Thank you for your patience.

Lalbee99 commented 5 years ago

You nailed it, good job !

KnoAll commented 5 years ago

@netniV Thanks so much! Much appreciated.