Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exporter resolve my FQDN and return a 404 code #10

Open
Piknik1990 opened this issue Jan 10, 2020 · 1 comment
Open

Exporter resolve my FQDN and return a 404 code #10

Piknik1990 opened this issue Jan 10, 2020 · 1 comment

Comments

@Piknik1990
Copy link

Piknik1990 commented Jan 10, 2020

Hello!
Thanks you a lot for a fine exporter.

The one bug:
I have a two ILO-servers by https connections. In https I was customizated selfsign SSL certs for domain name "ilo.master.my.org" and add this domain to the hosts-file

192.168.1.14 ilo.master.my.org

My Prometheus configuration is:

  - job_name: 'hpilo-master'
    scrape_interval: 1m
    params:
      ilo_port: ['443']
      ilo_user: ['Administrator']
      ilo_password: ['secret']
    static_configs:
      - targets:
        - ilo.master.my.org
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_ilo_host
      - source_labels: [__param_ilo_host]
        target_label: ilo_host
      - target_label: __address__
        replacement: master:9416

Prometheus sending http-request a correct:

prometheus[8021]: level=debug ts=2020-01-10T20:39:14.074Z caller=scrape.go:920 component="scrape manager" scrape_pool=hpilo-slave target="http://master:9416/metrics?ilo_host=ilo.slave.my.org&ilo_password=secret&ilo_port=443&ilo_user=Administrator" msg="Scrape failed" err="server returned HTTP status 404 Not Found""

but hpilo_exporter resolve my FQDN to IP and this is broken my HTTPS-logic:

hpilo-exporter[6163]: 192.168.1.8 - - [07/Jan/2020 04:06:13] "GET /metrics?ilo_host=192.168.1.14&ilo_password=secret&ilo_port=443&ilo_user=Administrator HTTP/1.1" 404 -

Of course, this is not work and return 404 code to me.

On my host with installed hpilo_exporter SSL work is fine, but this broken SSL logic.

My hpilo_exporter ran like here:

● hpilo-exporter.service - HPILO Exporter
   Loaded: loaded (/etc/systemd/system/hpilo-exporter.service; enabled; vendor preset: disabled)
   Active: active (running) since Пт 2020-01-10 23:57:48 MSK; 3s ago
 Main PID: 50145 (hpilo-exporter)
    Tasks: 1
   CGroup: /system.slice/hpilo-exporter.service
           └─50145 /usr/bin/python2 /bin/hpilo-exporter --address=0.0.0.0 --port=9416 --endpoint="/metrics"

янв 11 00:20:15 slave.hv.my.org systemd[1]: Started HPILO Exporter.
янв 11 00:20:16 slave.hv.my.org hpilo-exporter[50145]: Starting exporter on: http://0.0.0.0:9416"/metrics"
янв 11 00:20:16 slave.hv.my.org hpilo-exporter[50145]: Press Ctrl+C to quit

#!/usr/bin/python2
# EASY-INSTALL-ENTRY-SCRIPT: 'hpilo-exporter==0.3.4','console_scripts','hpilo-exporter'
__requires__ = 'hpilo-exporter==0.3.4'
@saied-nawaz
Copy link

Did you manage to solve this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants