Configure Prometheus nginx exporter on mesosphere DCOS cluster using marathon
NickName:Rajasi Kulkarni Ask DateTime:2015-08-12T19:07:15

Configure Prometheus nginx exporter on mesosphere DCOS cluster using marathon

I have followed steps given in https://github.com/discordianfish/nginx_exporter to set up a docker container for nginx exporter.

Now I want to install the docker container for nginx using marathon on mesosphere cluster. How do I provide parameter 'nginx.scrape_uri' to the docker container. I have tried using the 'parameter' primitive given in 'Privileged Mode and Arbitrary Docker Options' in this link https://mesosphere.github.io/marathon/docs/native-docker.html However, adding the parameter primitive in the JSON keeps the app stuck in 'deploying' state.

My JSON file that I am using to create app for nginx-exporter using marathon is:

{
  "id": "/nginx-exporter",
  "instances": 1,
  "cpus": 0.1,
  "mem": 25,
  "constraints": [["hostname", "UNIQUE"]],
  "acceptedResourceRoles": ["slave_public"],
  "container": {
    "type": "DOCKER",
    "docker": {
        "image": "fish/nginx-exporter",
        "network": "BRIDGE",
        "portMappings": [
                           {
                              "containerPort": 9113,
                              "hostPort": 9113,
                              "protocol": "tcp"
                           }
                        ],
        "parameters":   [   {"key": "nginx.scrape_uri", "value": "http://52.76.26.53:8080" }
                        ]
              }
  },
  "healthChecks": [{
    "protocol": "TCP",
    "gracePeriodSeconds": 600,
    "intervalSeconds": 30,
    "portIndex": 0,
    "timeoutSeconds": 10,
    "maxConsecutiveFailures": 2
  }]
}

Please let me know the correct way of adding parameter 'nginx.scrape_uri' to the JSON file. Thanks.

Copyright Notice:Content Author:「Rajasi Kulkarni」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/31963430/configure-prometheus-nginx-exporter-on-mesosphere-dcos-cluster-using-marathon

More about “Configure Prometheus nginx exporter on mesosphere DCOS cluster using marathon” related questions

Configure Prometheus nginx exporter on mesosphere DCOS cluster using marathon

I have followed steps given in https://github.com/discordianfish/nginx_exporter to set up a docker container for nginx exporter. Now I want to install the docker container for nginx using maratho...

Show Detail

Setting up cloud watch exporter for prometheus on mesosphere DCOS cluster

I have set up cloud watch exporter for Prometheus on my AWS mesosphere DCOS cluster. I have 'CloudWatchFullAccess' policy enabled. But meter, 'cloudwatch_exporter_scrape_error' shows non-zero value...

Show Detail

Configuring prometheus mesos-exporter running on mesosphere DCOS

I am trying to set up mesos exporter on my mesosphere DCOS cluster. The link I am referring to is https://github.com/prometheus/mesos_exporter. The JSON file I have used is : { "id": "/

Show Detail

Problem in enable Authenticate Mesos APIs in Mesosphere/ DCOS

Authentication is not enable for Mesos APIs by default. After Install DCOS I want config Mesos API Authentication on it. I'm going to set authentication for mesos APIs like : register_frameworks,

Show Detail

DCOS marathon autoscaling failed--master url

I have a DCOS cluster running on azure and I have unlocked the DCOS ui by mapping it to my windows machine, so that I can access it on my localhost of windows-machine. I have a sample application r...

Show Detail

Expose Kubernete service to public inside mesosphere's DCOS

Followed https://www.mesosphere.com/amazon/ I created a DCOS cluster on Amazon AWS. Then I followed http://kubernetes.io/v1.1/docs/getting-started-guides/dcos.html and installed Kubernete on it. Th...

Show Detail

zsh: command not found: dcos

I tried to install DC/OS cluster on my Mac by dcos-vagrant. Intsallation is quite smooth, no errors found. ==> m1: sudo: chmod u+x /opt/mesosphere/bin/postflight.sh ==> m1: sudo: /opt/meso...

Show Detail

Mesosphere inter-service communication using Marathon

I'm currently looking into Mesosphere DCOS to run multiple micro-services using Docker containers. Each micro-services code is already built by my CI into a docker container and uploader to a private

Show Detail

flag provided but not defined in nginx prometheus exporter

I'm tryin to deploy an nginx prometheus exporter (https://github.com/nginxinc/nginx-prometheus-exporter) in a kubernetes cluster but if I use param "-nginx.scrape-uri" in the args tag it ...

Show Detail

Gather prometheus metrics on DCOS

I used DCOS with marathon. Every docker application provides metrics on /prometheus endpoint. I need to separate metrics for every docker instance. I tried to deploy prometheus server with config:

Show Detail