Multiple Targets on prometheus










1















I've configured prometheus on Centos, version details are follows.



prometheus-2.5.0.linux-386


I've added two targets on the prometheus.yml configuration file, all the servers node exporters are running. Config as follows,



 scrape_configs:
- job_name: "node"
scrape_interval: "15s"
target_groups:
- targets: ['192.168.x.x:9100','192.168.x.y:9100']


But in the prometheus UI Tragets only showing single node other is not showing. If I remove one node existing node is showing. How can I monitor multiple nodes. But in Grafana Dashboard shows Multiple Series Error.










share|improve this question




























    1















    I've configured prometheus on Centos, version details are follows.



    prometheus-2.5.0.linux-386


    I've added two targets on the prometheus.yml configuration file, all the servers node exporters are running. Config as follows,



     scrape_configs:
    - job_name: "node"
    scrape_interval: "15s"
    target_groups:
    - targets: ['192.168.x.x:9100','192.168.x.y:9100']


    But in the prometheus UI Tragets only showing single node other is not showing. If I remove one node existing node is showing. How can I monitor multiple nodes. But in Grafana Dashboard shows Multiple Series Error.










    share|improve this question


























      1












      1








      1








      I've configured prometheus on Centos, version details are follows.



      prometheus-2.5.0.linux-386


      I've added two targets on the prometheus.yml configuration file, all the servers node exporters are running. Config as follows,



       scrape_configs:
      - job_name: "node"
      scrape_interval: "15s"
      target_groups:
      - targets: ['192.168.x.x:9100','192.168.x.y:9100']


      But in the prometheus UI Tragets only showing single node other is not showing. If I remove one node existing node is showing. How can I monitor multiple nodes. But in Grafana Dashboard shows Multiple Series Error.










      share|improve this question
















      I've configured prometheus on Centos, version details are follows.



      prometheus-2.5.0.linux-386


      I've added two targets on the prometheus.yml configuration file, all the servers node exporters are running. Config as follows,



       scrape_configs:
      - job_name: "node"
      scrape_interval: "15s"
      target_groups:
      - targets: ['192.168.x.x:9100','192.168.x.y:9100']


      But in the prometheus UI Tragets only showing single node other is not showing. If I remove one node existing node is showing. How can I monitor multiple nodes. But in Grafana Dashboard shows Multiple Series Error.







      prometheus prometheus-alertmanager prometheus-node-exporter






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 14 '18 at 10:47







      nomad

















      asked Nov 14 '18 at 8:19









      nomadnomad

      538




      538






















          2 Answers
          2






          active

          oldest

          votes


















          4














          I've configured with this configurations on prometheus.yml



           # my global config
          global:
          scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
          evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
          # scrape_timeout is set to the global default (10s).

          # Alertmanager configuration
          alerting:
          alertmanagers:
          - static_configs:
          - targets:
          # - alertmanager:9093

          # Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
          rule_files:
          # - "first_rules.yml"
          # - "second_rules.yml"

          # A scrape configuration containing exactly one endpoint to scrape:
          # Here it's Prometheus itself.
          scrape_configs:
          # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
          - job_name: 'node'

          # metrics_path defaults to '/metrics'
          # scheme defaults to 'http'.

          static_configs:
          - targets: ['192.168.x.x:9100']
          - targets: ['192.168.x.y:9100']
          - targets: ['192.168.x.z:9100']





          share|improve this answer























          • With this successfully configured.

            – nomad
            Nov 15 '18 at 8:00


















          0














          You can scrape the multiple targets in prometheus. Try this way:



          global:
          scrape_interval: 15s # Scrape targets every 15 seconds
          scrape_timeout: 15s # Timeout after 15 seconds

          # Attach the label monitor=dev-monitor to all scraped time series scraped by this server
          labels:
          monitor: 'dev-monitor'

          scrape_configs:
          - job_name: "job-name"
          scrape_interval: 10s # Override the default global interval for this job
          scrape_timeout: 10s # Override the default global timeout for this job
          target_groups:
          # First group of scrape targets
          - targets: ['localhost:9100', 'localhost:9101']
          labels:
          group: 'first-group'

          # Second group of scrape targets
          - targets: ['localhost:9200', 'localhost:9201']
          labels:
          group: 'second-group'


          Hope this helps.






          share|improve this answer























          • Thanks. How many hosts can connect with prometheus?

            – nomad
            Nov 15 '18 at 8:01











          • Newer versions of Prometheus use "static_configs" rather than "target_groups". The other answer has the most up to date version.

            – Liam Stanley
            Jan 24 at 16:49










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53295711%2fmultiple-targets-on-prometheus%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          4














          I've configured with this configurations on prometheus.yml



           # my global config
          global:
          scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
          evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
          # scrape_timeout is set to the global default (10s).

          # Alertmanager configuration
          alerting:
          alertmanagers:
          - static_configs:
          - targets:
          # - alertmanager:9093

          # Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
          rule_files:
          # - "first_rules.yml"
          # - "second_rules.yml"

          # A scrape configuration containing exactly one endpoint to scrape:
          # Here it's Prometheus itself.
          scrape_configs:
          # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
          - job_name: 'node'

          # metrics_path defaults to '/metrics'
          # scheme defaults to 'http'.

          static_configs:
          - targets: ['192.168.x.x:9100']
          - targets: ['192.168.x.y:9100']
          - targets: ['192.168.x.z:9100']





          share|improve this answer























          • With this successfully configured.

            – nomad
            Nov 15 '18 at 8:00















          4














          I've configured with this configurations on prometheus.yml



           # my global config
          global:
          scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
          evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
          # scrape_timeout is set to the global default (10s).

          # Alertmanager configuration
          alerting:
          alertmanagers:
          - static_configs:
          - targets:
          # - alertmanager:9093

          # Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
          rule_files:
          # - "first_rules.yml"
          # - "second_rules.yml"

          # A scrape configuration containing exactly one endpoint to scrape:
          # Here it's Prometheus itself.
          scrape_configs:
          # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
          - job_name: 'node'

          # metrics_path defaults to '/metrics'
          # scheme defaults to 'http'.

          static_configs:
          - targets: ['192.168.x.x:9100']
          - targets: ['192.168.x.y:9100']
          - targets: ['192.168.x.z:9100']





          share|improve this answer























          • With this successfully configured.

            – nomad
            Nov 15 '18 at 8:00













          4












          4








          4







          I've configured with this configurations on prometheus.yml



           # my global config
          global:
          scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
          evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
          # scrape_timeout is set to the global default (10s).

          # Alertmanager configuration
          alerting:
          alertmanagers:
          - static_configs:
          - targets:
          # - alertmanager:9093

          # Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
          rule_files:
          # - "first_rules.yml"
          # - "second_rules.yml"

          # A scrape configuration containing exactly one endpoint to scrape:
          # Here it's Prometheus itself.
          scrape_configs:
          # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
          - job_name: 'node'

          # metrics_path defaults to '/metrics'
          # scheme defaults to 'http'.

          static_configs:
          - targets: ['192.168.x.x:9100']
          - targets: ['192.168.x.y:9100']
          - targets: ['192.168.x.z:9100']





          share|improve this answer













          I've configured with this configurations on prometheus.yml



           # my global config
          global:
          scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
          evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
          # scrape_timeout is set to the global default (10s).

          # Alertmanager configuration
          alerting:
          alertmanagers:
          - static_configs:
          - targets:
          # - alertmanager:9093

          # Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
          rule_files:
          # - "first_rules.yml"
          # - "second_rules.yml"

          # A scrape configuration containing exactly one endpoint to scrape:
          # Here it's Prometheus itself.
          scrape_configs:
          # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
          - job_name: 'node'

          # metrics_path defaults to '/metrics'
          # scheme defaults to 'http'.

          static_configs:
          - targets: ['192.168.x.x:9100']
          - targets: ['192.168.x.y:9100']
          - targets: ['192.168.x.z:9100']






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 15 '18 at 6:34









          vishvish

          12710




          12710












          • With this successfully configured.

            – nomad
            Nov 15 '18 at 8:00

















          • With this successfully configured.

            – nomad
            Nov 15 '18 at 8:00
















          With this successfully configured.

          – nomad
          Nov 15 '18 at 8:00





          With this successfully configured.

          – nomad
          Nov 15 '18 at 8:00













          0














          You can scrape the multiple targets in prometheus. Try this way:



          global:
          scrape_interval: 15s # Scrape targets every 15 seconds
          scrape_timeout: 15s # Timeout after 15 seconds

          # Attach the label monitor=dev-monitor to all scraped time series scraped by this server
          labels:
          monitor: 'dev-monitor'

          scrape_configs:
          - job_name: "job-name"
          scrape_interval: 10s # Override the default global interval for this job
          scrape_timeout: 10s # Override the default global timeout for this job
          target_groups:
          # First group of scrape targets
          - targets: ['localhost:9100', 'localhost:9101']
          labels:
          group: 'first-group'

          # Second group of scrape targets
          - targets: ['localhost:9200', 'localhost:9201']
          labels:
          group: 'second-group'


          Hope this helps.






          share|improve this answer























          • Thanks. How many hosts can connect with prometheus?

            – nomad
            Nov 15 '18 at 8:01











          • Newer versions of Prometheus use "static_configs" rather than "target_groups". The other answer has the most up to date version.

            – Liam Stanley
            Jan 24 at 16:49















          0














          You can scrape the multiple targets in prometheus. Try this way:



          global:
          scrape_interval: 15s # Scrape targets every 15 seconds
          scrape_timeout: 15s # Timeout after 15 seconds

          # Attach the label monitor=dev-monitor to all scraped time series scraped by this server
          labels:
          monitor: 'dev-monitor'

          scrape_configs:
          - job_name: "job-name"
          scrape_interval: 10s # Override the default global interval for this job
          scrape_timeout: 10s # Override the default global timeout for this job
          target_groups:
          # First group of scrape targets
          - targets: ['localhost:9100', 'localhost:9101']
          labels:
          group: 'first-group'

          # Second group of scrape targets
          - targets: ['localhost:9200', 'localhost:9201']
          labels:
          group: 'second-group'


          Hope this helps.






          share|improve this answer























          • Thanks. How many hosts can connect with prometheus?

            – nomad
            Nov 15 '18 at 8:01











          • Newer versions of Prometheus use "static_configs" rather than "target_groups". The other answer has the most up to date version.

            – Liam Stanley
            Jan 24 at 16:49













          0












          0








          0







          You can scrape the multiple targets in prometheus. Try this way:



          global:
          scrape_interval: 15s # Scrape targets every 15 seconds
          scrape_timeout: 15s # Timeout after 15 seconds

          # Attach the label monitor=dev-monitor to all scraped time series scraped by this server
          labels:
          monitor: 'dev-monitor'

          scrape_configs:
          - job_name: "job-name"
          scrape_interval: 10s # Override the default global interval for this job
          scrape_timeout: 10s # Override the default global timeout for this job
          target_groups:
          # First group of scrape targets
          - targets: ['localhost:9100', 'localhost:9101']
          labels:
          group: 'first-group'

          # Second group of scrape targets
          - targets: ['localhost:9200', 'localhost:9201']
          labels:
          group: 'second-group'


          Hope this helps.






          share|improve this answer













          You can scrape the multiple targets in prometheus. Try this way:



          global:
          scrape_interval: 15s # Scrape targets every 15 seconds
          scrape_timeout: 15s # Timeout after 15 seconds

          # Attach the label monitor=dev-monitor to all scraped time series scraped by this server
          labels:
          monitor: 'dev-monitor'

          scrape_configs:
          - job_name: "job-name"
          scrape_interval: 10s # Override the default global interval for this job
          scrape_timeout: 10s # Override the default global timeout for this job
          target_groups:
          # First group of scrape targets
          - targets: ['localhost:9100', 'localhost:9101']
          labels:
          group: 'first-group'

          # Second group of scrape targets
          - targets: ['localhost:9200', 'localhost:9201']
          labels:
          group: 'second-group'


          Hope this helps.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 14 '18 at 10:01









          Prafull LadhaPrafull Ladha

          3,6381523




          3,6381523












          • Thanks. How many hosts can connect with prometheus?

            – nomad
            Nov 15 '18 at 8:01











          • Newer versions of Prometheus use "static_configs" rather than "target_groups". The other answer has the most up to date version.

            – Liam Stanley
            Jan 24 at 16:49

















          • Thanks. How many hosts can connect with prometheus?

            – nomad
            Nov 15 '18 at 8:01











          • Newer versions of Prometheus use "static_configs" rather than "target_groups". The other answer has the most up to date version.

            – Liam Stanley
            Jan 24 at 16:49
















          Thanks. How many hosts can connect with prometheus?

          – nomad
          Nov 15 '18 at 8:01





          Thanks. How many hosts can connect with prometheus?

          – nomad
          Nov 15 '18 at 8:01













          Newer versions of Prometheus use "static_configs" rather than "target_groups". The other answer has the most up to date version.

          – Liam Stanley
          Jan 24 at 16:49





          Newer versions of Prometheus use "static_configs" rather than "target_groups". The other answer has the most up to date version.

          – Liam Stanley
          Jan 24 at 16:49

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53295711%2fmultiple-targets-on-prometheus%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          How to how show current date and time by default on contact form 7 in WordPress without taking input from user in datetimepicker

          Syphilis

          Darth Vader #20