Giter VIP home page Giter VIP logo

Comments (2)

znerol avatar znerol commented on June 15, 2024

Prometheus PVE Exporter uses https://github.com/proxmoxer/proxmoxer under the hood. It looks like there are two ways to specify a port in the HTTPS Backend:

class Backend(object):
    def __init__(self, host, user=None, password=None, otp=None, port=None,
                 verify_ssl=True, mode='json', timeout=5, auth_token=None,
                 csrf_token=None, token_name=None, token_value=None, service='PVE'):
        if ':' in host:
            host, host_port = host.split(':')
            port = host_port if host_port.isdigit() else port

Either specify port alongside user and password in pve.yml or supply host:port as the target param in prometheus scraper config.

Example for pve.yml:

default:
  user: prometheus@pve
  password: sEcr3T!
  port: 443

Example for prometheus config:

scrape_configs:
  - job_name: 'pve'
    static_configs:
      - targets:
        - 192.168.1.2:443  # Proxmox VE node listening on HTTPS port.
        - 192.168.1.3:443  # Proxmox VE node listening on HTTPS port.
    metrics_path: /pve
    params:
      module: [default]
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: 127.0.0.1:9221  # PVE exporter.

from prometheus-pve-exporter.

logopk avatar logopk commented on June 15, 2024

Nice! Thanks.

I used the method via pve.yml as that does not change the instance name in grafana.

from prometheus-pve-exporter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.