pihole-exporter: github.com/eko/pihole-exporter/internal/metrics Index | Files

package metrics

import "github.com/eko/pihole-exporter/internal/metrics"

Index

Package Files

metrics.go

Variables

var (
    // DomainsBlocked - The number of domains being blocked by PI-Hole.
    DomainsBlocked = prometheus.NewGaugeVec(
        prometheus.GaugeOpts{
            Name:      "domains_being_blocked",
            Namespace: "pihole",
            Help:      "This represent the number of domains being blocked",
        },
        []string{"hostname"},
    )

    // DNSQueriesToday - The number of DNS requests made over PI-Hole over the current day.
    DNSQueriesToday = prometheus.NewGaugeVec(
        prometheus.GaugeOpts{
            Name:      "dns_queries_today",
            Namespace: "pihole",
            Help:      "This represent the number of DNS queries made over the current day",
        },
        []string{"hostname"},
    )

    // AdsBlockedToday - The number of ads blocked by PI-Hole over the current day.
    AdsBlockedToday = prometheus.NewGaugeVec(
        prometheus.GaugeOpts{
            Name:      "ads_blocked_today",
            Namespace: "pihole",
            Help:      "This represent the number of ads blocked over the current day",
        },
        []string{"hostname"},
    )

    // AdsPercentageToday - The percentage of ads blocked by PI-Hole over the current day.
    AdsPercentageToday = prometheus.NewGaugeVec(
        prometheus.GaugeOpts{
            Name:      "ads_percentage_today",
            Namespace: "pihole",
            Help:      "This represent the percentage of ads blocked over the current day",
        },
        []string{"hostname"},
    )

    // UniqueDomains - The number of unique domains seen by PI-Hole.
    UniqueDomains = prometheus.NewGaugeVec(
        prometheus.GaugeOpts{
            Name:      "unique_domains",
            Namespace: "pihole",
            Help:      "This represent the number of unique domains seen",
        },
        []string{"hostname"},
    )

    // QueriesForwarded - The number of queries forwarded by PI-Hole.
    QueriesForwarded = prometheus.NewGaugeVec(
        prometheus.GaugeOpts{
            Name:      "queries_forwarded",
            Namespace: "pihole",
            Help:      "This represent the number of queries forwarded",
        },
        []string{"hostname"},
    )

    // QueriesCached - The number of queries cached by PI-Hole.
    QueriesCached = prometheus.NewGaugeVec(
        prometheus.GaugeOpts{
            Name:      "queries_cached",
            Namespace: "pihole",
            Help:      "This represent the number of queries cached",
        },
        []string{"hostname"},
    )

    // ClientsEverSeen - The number of clients ever seen by PI-Hole.
    ClientsEverSeen = prometheus.NewGaugeVec(
        prometheus.GaugeOpts{
            Name:      "clients_ever_seen",
            Namespace: "pihole",
            Help:      "This represent the number of clients ever seen",
        },
        []string{"hostname"},
    )

    // UniqueClients - The number of unique clients seen by PI-Hole.
    UniqueClients = prometheus.NewGaugeVec(
        prometheus.GaugeOpts{
            Name:      "unique_clients",
            Namespace: "pihole",
            Help:      "This represent the number of unique clients seen",
        },
        []string{"hostname"},
    )

    // DNSQueriesAllTypes - The number of DNS queries made for all types by PI-Hole.
    DNSQueriesAllTypes = prometheus.NewGaugeVec(
        prometheus.GaugeOpts{
            Name:      "dns_queries_all_types",
            Namespace: "pihole",
            Help:      "This represent the number of DNS queries made for all types",
        },
        []string{"hostname"},
    )

    // Reply - The number of replies made for every types by PI-Hole.
    Reply = prometheus.NewGaugeVec(
        prometheus.GaugeOpts{
            Name:      "reply",
            Namespace: "pihole",
            Help:      "This represent the number of replies made for all types",
        },
        []string{"hostname", "type"},
    )

    // TopQueries - The number of top queries made by PI-Hole by domain.
    TopQueries = prometheus.NewGaugeVec(
        prometheus.GaugeOpts{
            Name:      "top_queries",
            Namespace: "pihole",
            Help:      "This represent the number of top queries made by PI-Hole by domain",
        },
        []string{"hostname", "domain"},
    )

    // TopAds - The number of top ads made by PI-Hole by domain.
    TopAds = prometheus.NewGaugeVec(
        prometheus.GaugeOpts{
            Name:      "top_ads",
            Namespace: "pihole",
            Help:      "This represent the number of top ads made by PI-Hole by domain",
        },
        []string{"hostname", "domain"},
    )

    // TopSources - The number of top sources requests made by PI-Hole by source host.
    TopSources = prometheus.NewGaugeVec(
        prometheus.GaugeOpts{
            Name:      "top_sources",
            Namespace: "pihole",
            Help:      "This represent the number of top sources requests made by PI-Hole by source host",
        },
        []string{"hostname", "source"},
    )

    // ForwardDestinations - The number of forward destinations requests made by PI-Hole by destination.
    ForwardDestinations = prometheus.NewGaugeVec(
        prometheus.GaugeOpts{
            Name:      "forward_destinations",
            Namespace: "pihole",
            Help:      "This represent the number of forward destinations requests made by PI-Hole by destination",
        },
        []string{"hostname", "destination"},
    )

    // QueryTypes - The number of queries made by PI-Hole by type.
    QueryTypes = prometheus.NewGaugeVec(
        prometheus.GaugeOpts{
            Name:      "querytypes",
            Namespace: "pihole",
            Help:      "This represent the number of queries made by PI-Hole by type",
        },
        []string{"hostname", "type"},
    )

    // Status - Is PI-Hole enabled?
    Status = prometheus.NewGaugeVec(
        prometheus.GaugeOpts{
            Name:      "status",
            Namespace: "pihole",
            Help:      "This if PI-Hole is enabled",
        },
        []string{"hostname"},
    )
)

func Init Uses

func Init()

Init initializes all Prometheus metrics made available by PI-Hole exporter.

Package metrics imports 2 packages (graph) and is imported by 2 packages. Updated 2019-05-09. Refresh now. Tools for package owners.