Skip to content

Instantly share code, notes, and snippets.

@eeddaann
Last active November 7, 2017 14:29
Show Gist options
  • Save eeddaann/dc6bcf0e5cc9d460e185161a1387851b to your computer and use it in GitHub Desktop.
Save eeddaann/dc6bcf0e5cc9d460e185161a1387851b to your computer and use it in GitHub Desktop.
this gist help with creating grafana templating from docker swarm services

configure templating for docker service

  • create new variable with type Query and name it as you wish
  • under Query Options:
    • Query: container_tasks_state{state="running",container_label_com_docker_swarm_service_name=~".*_logstash"}
    • Regex: /.container_label_com_docker_swarm_service_name="(.)",container_label_com_docker_swarm_task_id=/

it will create variables for any service which ends with "logstash"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment