package
0.0.1
Repository: https://github.com/vultr/v-agent.git
Documentation: pkg.go.dev

# Functions

AddLabels adds labels to metrics very important for scraped metrics, otherwise they'll be sent without essential labels (subid, etc).
DoEtcdHealthCheck probes /health and returns nil or ErrKubeApiServerUnhealthy, or some other error.
DoHAProxyHealthCheck probes /metrics and returns nil or ErrHAProxyServerUnhealthy, or some other error.
DoKonnectivityHealthCheck probes /healthz and returns nil or ErrKonnectivityServerUnhealthy, or some other error.
DoKubeAPIServerHealthCheck probes /healthz and returns nil or ErrKubeAPIServerUnhealthy, or some other error.
DoNginxVTSHealthCheck probes /metrics and returns nil or ErrNginxVTSServerUnhealthy, or some other error.
DoVCDNAgentHealthCheck probes /metrics and returns nil or ErrVCDNAgentServerUnhealthy, or some other error.
DoVDNSHealthCheck probes /metrics and returns nil or ErrVDNSUnhealthy, or some other error.
Gather gathers updates metrics.
GetMetricsAsTimeSeries returns metrics as timeseries for remote write.
NewMetrics initializes metrics.
NewWriteClient creates a new WriteClient.
ProbeCephMetrics probes /metrics from ceph.
ProbeDCGMMetrics probes /metrics from DCGM.
ProbeEtcdMetrics probes /metrics from etcd.
ProbeHAProxyMetrics probes /metrics from haproxy.
ProbeKonnectivityMetrics probes /metrics from konnectivity.
ProbeKubeAPIServerMetrics probes /metrics from kube-apiserver.
ProbeKubernetesPod pulls metrics from a specific pod.
ProbeNginxVTSMetrics probes /metrics from nginx-vts.
ProbeSMARTBlockDevice returns a SMART struct with the device and the SMART attributes Supports NVMe and SATA.
ProbeVCDNAgentMetrics probes /metrics from v-cdn-agent.
ProbeVDNSMetrics probes /metrics from v-dns.
ResetSMARTMetrics resets SMART metrics incase drives were swapped.
ScrapeCephMetrics scrapes ceph /metrics endpoint and remote writes the metrics.
ScrapeDCGMMetrics scrapes nvidia DCGM metrics.
ScrapeEtcdMetrics scrapes kube-apiserver /metrics endpoint and remote writes the metrics.
ScrapeHAProxyMetrics scrapes haproxy /metrics endpoint and remote writes the metrics.
ScrapeKonnectivityMetrics scrapes konnectivity /metrics endpoint and remote writes the metrics.
ScrapeKubeAPIServerMetrics scrapes kube-apiserver /metrics endpoint and remote writes the metrics.
ScrapeKubernetesPods scrapes /metrics of all pods in specified namespaces that have metric collection enabled.
ScrapeNginxVTSMetrics scrapes nginx-vts /metrics endpoint and remote writes the metrics.
ScrapeSMARTMetrics probes block device metrics.
ScrapeVCDNAgentMetrics scrapes v-cdn-agent /metrics endpoint and remote writes the metrics.
ScrapeVDNSMetrics scrapes v-dns /metrics endpoint and remote writes the metrics.

# Variables

ErrCephMgrNotActive thrown if no data returned when attempting to read metrics.
ErrEtcdUnhealthy returned if response is not "true" from /health.
ErrHAProxyServerUnhealthy returned if response is not status code 200 from /metrics.
ErrInconsistentDisksReturned thrown if a read between /proc/diskstats results in less devices.
ErrKonnectivityServerUnhealthy returned if response is not "ok" from /healthz.
ErrKubeAPIServerUnhealthy returned if response is not "ok" from /healthz.
ErrNginxVTSServerUnhealthy returned if response is not status code 200 from /metrics.
ErrVCDNAgentServerUnhealthy returned if response is not status code 200 from /metrics.
ErrVDNSUnhealthy returned if response is not status code 200 from /metrics.

# Structs

BasicAuth holds the config for basic authentication.
DiskStats from /proc/diskstats https://www.kernel.org/doc/Documentation/iostats.txt.
FilesystemStats stats.
HealthResp response for /health is marshaled to this.
HTTPConfig holds the config for the HTTP client.
Loadavg from /proc/loadavg.
MemInfo is container for memory metrics.
Mounts from /proc/mounts.
NICMetrics metrics for the underlying NIC for the guest.
ProcStatCPU container for CPU metrics.
No description provided by the author
WriteClient is a client implementation of the Prometheus remote write protocol.