Sensu is a monitoring tool that can create events to alert users about server failures, application health, and more. Sensu can be configured to send external events to Metricly. This feature is only compatible with Linux machines.

The Sensu client name must match the name of an element being generated by some other integration. Thus, if you have the Metricly Linux Agent (or something similar) creating an element named “sample-element-1”, the Sensu client should be configured with “sample-element-1” in its client.json file.

Sending Sensu Events to Metricly

  1. Hover on your account name in the top right-hand corner and click API Keys from the drop-down menu.
  2. Copy the API key from the Custom integration in the table.
  3. Install the Metricly Event Handler.
    1. Download the Metricly Event Handler to the /bin directory.
      sudo curl
      -agent/metricly-event-handler-linux -o 
      If you’d rather manually download and install the executable, visit our repo.
    2. Ensure the file is executable (use the chmod command).
      sudo chmod 755 /bin/metricly-event-handler
    3. Create and configure the /etc/metricly/metricly-event-handler.yaml file using the API key you copied in step 2 and the URL to the events ingest API.
      apikey: your-apikey
      url: ""
  4. Create a handler in Sensu.
    1. Create a file named metricly_handler.json in etc/sensu/conf.d

      Sample metricly_handler.json file:

        "handlers": {
          "metricly-event-handler": {
            "type": "pipe",
            "command": "/bin/metricly
            -event-handler stdin -s Sensu",
            "severities": [
  5. Create at least one check in Sensu.

    To add a check to detect if the Linux Agent supervisor is running:

    1. Install the process checks script:
      sudo sensu-install -p process-checks:0.0.6
    2. Create a file named check_linux-agent.json in etc/sensu/conf.d. Sample check_linux-agent.json file:
        "checks": {
          "linux-agent": {
            "command": "check-process.rb -p 
            'linux-agent - Handlers' 
            -W 1 -C 1 -w 1 -c 1",
            "standalone": true,
            "interval": 60,
            "handlers": ["debug", "metricly-event-handler"]
  6. Restart the Sensu services to pick up the new check and handler.
    Sensu services must be restarted to pick up configuration changes. Sensu Enterprise can be reloaded.
  7. Check Metricly for your new Sensu events.