Collect metrics from HTTP endpoints such as web application APIs by defining HTTP agent items.
Collecting metrics from web services and applications is a complex affair usually done by scripting around CLIs and APIs. Organizations require an efficient way to monitor such and endpoints and react to collected data.
Collect and react to data from web services and applications with Zabbix HTTP agent items:
- Collect metrics agentlessly using HTTP/HTTPS protocols
- Collect metrics in bulk to reduce the number of outgoing requests
- Zabbix preprocessing can be utilized to extract the required metrics from the response
- Select from multiple HTTP authentication types
Check out the video to learn how to define HTTP items and collect metrics from HTTP endpoints.
Define HTTP items and collect metrics from HTTP endpoints:
- Navigate to Configuration → Hosts and find your host
- Open the Items section and press the Create item button
- Select Type – HTTP agent
- Provide the item key, name and URL
- For now, set the Type of information to Text
- Optionally, provide the request body and required status codes
- Press the Test button and then press Get value and test
- Save the resulting value to help you define the preprocessing steps
- Navigate to the Preprocessing tab
- Define a JSONPath preprocessing step to extract a value from the previous test result
- Navigate to the Item section
- Change the Type of information to Numeric (float)
- Perform the item test one more time
- Press Add to add the item
Tips and best practices
- HTTP item check is executed by Zabbix server or Zabbix proxy
- Zabbix will follow redirects if the Follow redirects option is checked
- HTTP items have their own Timeout parameter defined in the item configuration
- Receiving a status code not listed in the Required status codes field will result in the item becoming unsupported
Learn how to automate your Zabbix configuration workflows and integrate Zabbix with external systems by signing up for the Automation and Integration with Zabbix API course. During the course, students will learn how to use the Zabbix API by implementing different use cases under the guidance of a Zabbix certified trainer.