deployer/docs/contrib/grafana.md
Anton Medvedev 4ecc4786de Fix docgen
2021-11-06 19:02:51 +01:00

1.2 KiB
Raw Blame History

grafana

Source

Installing

Add to your deploy.php

require 'contrib/grafana.php';

Configuration options

  • url (required): the URL to the creates annotation api endpoint.
  • token (required): authentication token. Can be created at Grafana Console.
  • time (optional) set deploy time of annotation. specify epoch milliseconds. (Defaults is set to the current time in epoch milliseconds.)
  • tags (optional) set tag of annotation.
  • text (optional) set text of annotation. (Defaults is set to "Deployed " + git log -n 1 --format="%h")
deploy.php

set('grafana', [
    'token' => 'eyJrIj...',
    'url' => 'http://grafana/api/annotations',
    'tags' => ['deploy', 'production'],
]);

Usage

If you want to create annotation about successful end of deployment.

after('deploy:success', 'grafana:annotation');

Tasks

grafana:annotation

Source

Create Grafana annotation of deployment.