Feature only available for the Linux Server Monitoring Agent version 2.0.8 or newer.


You can use this feature of our Server Monitoring Agent to send custom metrics to be displayed for this Server Agent in your HetrixTools dashboard.

Requirements:

  • the variables must be stored in the form of a JSON in a file called custom_variables.json
  • this file must be located in the same folder as the agent script and must be readable by the hetrixtools user
  • example: {"var1":123,"var2":456}
  • variable names can be 2-32 characters long and contain only alphanumeric characters, spaces, dots, underscores, and hyphens [a-zA-Z0-9 ._-]
  • values can only be numeric
  • a maximum of 20 custom variables are accepted for each server agent

Use case example:

  • you could create your own script that would record certain metrics on your server; for instance, a script that records the MySQL total connections and failed connections every minute
  • your script can then record these metrics into the custom_variables.json file, located in the HetrixTools server agent folder
  • example: {"MySQLTotal":84,"MySQLFails":12}
  • our agent will then fetch these custom variables from this file every minute and post them to our platform to be displayed in this server agent’s metrics
  • you can run your custom script to refresh the custom variables as often as you’d like, but the HetrixTools agent will only record these metrics once per minute; we recommend running your custom script once per minute as well