Code Monkey home page Code Monkey logo

foreman-exporter's Introduction

Foreman Prometheus Exporter (!!! under development !!!)

This is a Prometheus exporter for Foreman.

Prerequisites

Installation

From sources

$ git clone https://github.com/Crisu1710/foreman-exporter.git
$ cd foreman-exporter

Build the binary:

$ RUN CGO_ENABLE=0 GOOS=linux GOARCH=amd64 go build -o foreman-exporter .

Usage

To run the exporter, type the following commands:

$ export FOREMAN_HOST="foreman.example.com" #Set Foremen host
$ echo -n USER:PASSWORD | base64
$ export FOREMAN_PW="Basic THE_OUTPUT_FROM_ECHO" #Password for the API User

Binary:

$ ./foreman_exporter

Sources:

$ go run main.go

Using K8s

apiVersion: apps/v1
kind: Deployment
metadata:
  name: foreman-exporter-deploy
  labels:
    app.kubernetes.io/name: foreman-exporter
    app.kubernetes.io/version: "0.1.0"
spec:
  replicas: 1
  selector:
    matchLabels:
      app: foreman-exporter
  template:
    metadata:
      labels:
        app: foreman-exporter
      annotations:
        prometheus.io/scrape: "true"
        prometheus.io/port: "2112"
    spec:
      containers:
        - name: foreman-exporter
          image: ghcr.io/crisu1710/foreman_exporter:0.1.0
          env:
            - name: FOREMAN_HOST
              value: foreman.example.com
            - name: FOREMAN_PW
              value: "Basic THE_OUTPUT_FROM_ECHO" #echo -n USER:PASSWORD | base64
          ports:
            - containerPort: 2112
              name: metrics

Available Prometheus metrics

Metric name Description
foreman_puppet_last_report Timestamp of the last puppet run of each host

foreman-exporter's People

Contributors

crisu1710 avatar dependabot[bot] 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.