Git Product home page Git Product logo

linode-exporter's Introduction

build Go Reference Go Report Card

Inspired by and templated from DigitalOcean Exporter.

Thanks metalmatze!

References

Development Installation

go get github.com/DazWilkin/linode-exporter

Then:

LINODE_TOKEN=[[YOUR-LINODE-API-TOKEN]]
ENDPOINT=":9388"
METRICS="/metrics"

go run github.com/DazWilkin/linode-exporter \
--linode_token=${LINODE_TOKEN} \
--endpoint=${ENDPOINT} \
--path=${METRICS}

Run-only Installation

Linode Exporter only

Either:

LINODE_TOKEN=[[LINODE-API-TOKEN]]
PORT=9388
docker run \
--interactive \
--tty \
--publish=${PORT}:${PORT} \
ghcr.io/dazwilkin/linode-exporter:b4e6fabbbd64132b4f08a164cfc42365ae859d50 \
  --linode_token=${LINODE_TOKEN}

The exporter's metrics endpoint will be available on http://localhost:${PORT}/metrics

Linode Exporter with Prometheus, AlertManager and cAdvisor

NB AlertManager integration is a work-in-progress

The following

LINODE_TOKEN=[[LINODE-API-TOKEN]]
docker-compose --file=${PWD}/docker-compose.yaml up

You may check the state of the services using:

docker-compose ps

And logs for a specific service using, e.g.:

docker-compose logs linode-exporter

The following endpoints are exposed:

  • Linode-Exporter metrics: http://localhost:9388/metrics
  • Prometheus UI: http://localhost:9090
  • AlertManager UI: http://localhost:9093
  • cAdvisor UI: http://localhost:8085

NB cAdvisor is mapped to :8085 rather than it's default port :8080

Using the Prometheus UI, you may begin querying metrics by typing linode_ to see the available set.

The full list is below.

Metrics

Name Type Description
linode_account_balance Gauge
linode_account_uninvoiced Gauge
linode_exporter_up Counter A metric with a constant value of '1' labeled with go, OS and the exporter versions
linode_instance_up Counter
linode_instance_disk Gauge
linode_instance_memory Gauge
linode_instance_cpus Gauge
linode_kubernetes_up Counter
linode_kubernetes_pool Counter
linode_kubernetes_linode_up Counter
linode_nodebalancer_count Gauge
linode_nodebalancer_transfer_total_bytes Gauge
linode_nodebalancer_transfer_out_bytes Gauge
linode_nodebalancer_transfer_in_bytes Gauge
linode_volume_up Counter
linode_tickets_count Gauge

Please file issues and feature requests

Development

Each 'collector' is defined under /collectors/[name].go.

Collectors are instantiated by main.go with registry.MustRegister(NewSomethingCollector(linodeClient))

The [name].go collector implements Prometheus' Collector interface: Collect and Describe

Documentation

https://godoc.org/github.com/DazWilkin/linode-exporter/collector

Port Allocation

Registered "Linode Exporter" on Prometheus Wiki's Default Port Allocations with port 9388.

Sigstore

linode-exporter container images are being signed by Sigstore and may be verified:

cosign verify \
--key=./cosign.pub \
ghcr.io/dazwilkin/linode-exporter:b4e6fabbbd64132b4f08a164cfc42365ae859d50

NOTE cosign.pub may be downloaded from here

To install|update cosign:

go install github.com/sigstore/cosign/cmd/cosign@latest

Similar Exporters



Buy Me A Coffee

linode-exporter's People

Contributors

dazwilkin avatar actions-user avatar dependabot[bot] avatar ycy1766 avatar

Watchers

 avatar

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.