Synthetic monitoring is critical for identifying and resolving production events, as it allows companies to proactively monitor the availability and performance of their applications and websites. By simulating real user interactions with these systems, synthetic monitoring can help identify potential issues before they affect real users.
This guide outlines the steps required to use the Coralogix Telegraf integration to monitor response codes and response times of URLs and ship the metrics to Coralogix.
This configuration makes use of the Telegraf plugin inputs.http_response. This plugin allows you to provide a list of URLs to Telegraf which will then attempt to connect to each URL and provide the following metrics:
1. Sign up for a Coralogix account. Set up your account on the Coralogix domain corresponding to the region within which you would like your data stored.
1. Once you have configured Telegraf, add the following code into your configuration file:
## Server address (default http://localhost)
urls = ["https://coralogix.com"]
## Set response_timeout (default 5 seconds)
# response_timeout = "5s"
## Whether to follow redirects from the server (defaults to false)
follow_redirects = true
You are required to input the following variables:
urls (line 3): Change the values within this list to the URLs that you wish to monitor.
response_timeout (line 6): If the URLs that are being monitored usually take longer than 5 seconds to respond, we recommend to uncomment this line and increase the timeout value.
follow_redirects (line 9): This instructs Telegraf to follow redirects. Setting this to false will disable this feature. Any URL that returns a redirect response code (e.g. 301 or 302) will not appear as ‘Up’.
Further information on the available values within this configuration block can be found here.
2. Once you have input the variables above, save the file and restart Telegraf. Telegraf will now start testing connectivity to the URLs and shipping the metrics to Coralogix.
3. To loop over all monitored URLs and display metric data for each URL, upload the following Grafana Dashboard file to Coralogix hosted Grafana.