Skip to content
This repository was archived by the owner on Jul 8, 2021. It is now read-only.
This repository was archived by the owner on Jul 8, 2021. It is now read-only.

Still only seeing node-exporters internal IP instead of the hostname in Prometheus #4

@jaschaio

Description

@jaschaio

Not sure what I am doing wrong or if I have to do something specifically to get the hostname within Prometheus.

Stack File:

version: "3.5"

services:
    node-exporter:
        image: basi/node-exporter
        networks:
            - monitor
        environment:
            - HOST_HOSTNAME=/etc/host_hostname
        volumes:
            - /proc:/host/proc
            - /sys:/host/sys
            - /:/rootfs
            - /etc/hostname:/etc/host_hostname
        deploy:
            mode: global
            labels:
                - com.df.notify=true
                - com.df.scrapePort=9100
                - com.df.alertName.1=mem_load
                - com.df.alertIf.1=@node_mem_limit:0.8
                - com.df.alertFor.1=30s
                - com.df.alertName.2=diskload
                - com.df.alertIf.2=@node_fs_limit:0.8
                - com.df.alertFor.2=30s
            resources:
                reservations:
                    memory: 20M
                limits:
                    memory: 50M
        command: '--path.procfs="/host/proc" --path.sysfs="/host/sys" --collector.filesystem.ignored-mount-points="^/(sys|proc|dev|host|etc)($$|/)" --collector.textfile.directory="/etc/node-exporter/" --collector.conntrack --collector.diskstats --collector.entropy --collector.filefd --collector.filesystem --collector.loadavg --collector.mdadm --collector.meminfo --collector.netdev --collector.netstat --collector.stat --collector.textfile --collector.time --collector.vmstat --collector.ipvs'

networks:
    monitor:
        external: true
    proxy:
        external: true

Discovered Labels:

__address__="10.0.1.14:9100"  __meta_dns_name="tasks.exporter_node-exporter"  __metrics_path__="/metrics" __scheme__="http"  job="exporter_node-exporter"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions