Extracting content using the HTTP agent

If we need to monitor a web page over HTTPS, there could be another solution for the items we have seen for http. The HTTP agent is new in 4.0. This item type allows us to poll data using the HTTP/HTTPS protocol. Trapping is also possible, using the Zabbix sender or Zabbix sender protocol. Let's go to our host A test host go to items and click Create item:

  • Name: OpenStreetMap main page
  • Type: HTTP agent
  • Key: openstreetmap.main
  • URLhttps://www.openstreetmap.org/
  • Required status codes: 200
  • Retrieve mode: Headers
  • Type of information: Text
  • New application: OSM

Give the item some time, then go to Monitoring | Latest data, select A test host from the Host selection box, and click on Apply. We should now see the headers and the confirmation that our status code, 200, is OK:

The advantage of using this type of item is that we can make use of the Preprocessing tab, and that it supports HTTPS. There's much more this item can do, but that discussion is outside the scope of this book. At the end of this chapter, I have added some URLs that will give you more insight into this new item type.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.220.160.216