Is there a way to use one of the HTTP sensors to monitor a search field on a website and return a value if the search is successful? I'm trying to find a way to check to see if a Solr search is working from within the website, as opposed to just using a script sensor to check the service status.
verify search on a website
Votes:
0
8 Replies
Votes:
0
Since this is basically doing a POST or GET request on a page, you could check out the following guide, which allows for monitoring a website login. You'll need to modify it somewhat, of course, to match your website query.
PRTGapi |
Feature Requests |
WMI Issues |
SNMP Issues
Kind regards,
Stephan Linke, Tech Support Team
Votes:
0
Not sure how this will work since the search will technically work (it will search) even with an invalid query term. It just won't find a result. Also, firebug is no longer and I don't see where the raw data can be found on inspect?
Votes:
0
If the search field is always working and there's no result, how exactly would you check if the search is not working? Searching something that always yields a result?
PRTGapi |
Feature Requests |
WMI Issues |
SNMP Issues
Kind regards,
Stephan Linke, Tech Support Team
Votes:
0
We are really just trying to make sure that Solr is running and providing search results. We could do this with a SSH Script sensor, but we are trying to limit the amount of those that we use. Using an HTTP sensor seems less invasive/resource intensive. So, we are looking for a way to run a search on the page using the HTTP Advanced sensor, and if the search is successful, send back a code that the search is working (whether the search finds something or not).
In the above example, there may be an error if it doesn't find the requested search term, but that doesn't mean Solr isn't running/working. It just means it didn't find the term. Is there a way to use the sensor to test if they try to search for a term and Solr isn't working properly so doesn't even attempt the search?
Votes:
0
Hi nightowl,
Thank you for your post!
As my colleague Stephan mentioned, I recommend to use this guide in order to complete your request. For example, you could use the HTTP Advance Sensor and enter the corresponding Search-POST-URL. In addition, you can configure a key word search. This way, the Sensor executes the search-url once per scan interval and then searches the result for the keyword (e.g. "Not found")
Best Regards,
Moritz Heller
Paessler Tech Support
Votes:
0
Okay, so I did configure the HTTP Advanced sensor (the page does not require a login). I used the GET URL which searches for a specific term (ie: https://mysite.com/search?q=searchterm). Then, I checked for a keyword on the page. And it worked...is that the correct way to configure it? I tested it with a term that does not appear on the page and it gave a warning.
My question now is...is this a better way to check that the search service and database service are up and running, or is it better to use a SSH Script sensor with a script on the server which checks the services? (ie: service solr status, service postgres status)?
I have both options configured, but which is more resource intensive for the probe/PRTG server?
Votes:
0
Hi there,
it seems that you did everything right as the sensor seems to be working correctly.
In fact there is a difference in performance needs. The HTTP Advanced approach is definitely the way to go, performance wise. The SSH sensor has a pretty high performance impact due to the connection handling and protocol overhead.
An idea would be to have both sensors running, HTTP Advanced with 60 seconds scanning interval and the SSH sensor with 60 minutes.
(edited)
Kind regards,
Andreas Günther
Tech Support, Paessler AG
Created on May 28, 2019 1:01:27 PM by
Andreas Günther [Paessler Support]
Last change on May 29, 2019 11:43:09 AM by
Andreas Günther [Paessler Support]
Votes:
0
This is great information...I set it up just that way. Thanks so much for your help!
Add comment