Giter Site home page Giter Site logo

pixelrebel / flexlm_exporter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mjtrangoni/flexlm_exporter

0.0 0.0 0.0 4.2 MB

Prometheus exporter for FLEXlm License Manager information

License: Apache License 2.0

Go 95.09% Makefile 3.81% Dockerfile 1.09%

flexlm_exporter's Introduction

FLEXlm Exporter Build Status

CircleCI Docker Repository on Quay Docker Pulls Go Reference Coverage Status Go Report Card License StyleCI

Prometheus exporter for FLEXlm License Manager lmstat license information.

Install

go install github.com/mjtrangoni/flexlm_exporter

Building

cd $GOPATH/src/github.com/mjtrangoni/flexlm_exporter
make

Configuration

This is an illustrative example of the configuration file in YAML format.

# FlexLM Licenses to be monitored.
---
licenses:
  - name: app1
    license_file: /usr/local/flexlm/licenses/license.dat.app1
    features_to_exclude: feature1,feature2
    monitor_users: True
    monitor_reservations: True
    monitor_versions: False
  - name: app2
    license_server: 28000@host1,28000@host2,28000@host3
    features_to_include: feature5,feature30
    monitor_users: True
    monitor_reservations: True
    monitor_versions: False

Notes:

  1. It is possible to define a license with a path in license_file, that has to be readable from the exporter instance, or with license_server in a port@host combination format.
  2. You can exclude some features from exporting with features_to_exclude, or export some defined and exclude the rest with feature_to_include.

Running

./flexlm_exporter <flags>

Docker images

Docker images are available on,

  1. Quay.io. $ docker pull quay.io/mjtrangoni/flexlm_exporter:latest
  2. Docker. $ docker pull mjtrangoni/flexlm_exporter:latest
  3. GHCR. $ docker pull ghcr.io/mjtrangoni/flexlm_exporter:latest

Please make sure that SELinux is not running in your host, or run the container as root.

You can launch a flexlm_exporter container with,

$ export DOCKER_REPOSITORY="quay.io/mjtrangoni/flexlm_exporter:latest"
$ export LMUTIL_LOCAL="PATH where your lmutil binary is located"
$ export CONFIG_PATH_LOCAL="PATH where your exporter config file is located"
$ docker run --name flexlm_exporter -d -p 9319:9319 \
    --volume $LMUTIL_LOCAL:/usr/bin/flexlm/ \
    --volume $CONFIG_PATH_LOCAL:/home/exporter/config/licenses.yml \
    $DOCKER_REPOSITORY --path.lmutil="/usr/bin/flexlm/lmutil" \
    --path.config="/home/exporter/config/licenses.yml"

Metrics will now be reachable at http://localhost:9319/metrics.

What's exported?

  1. lmutil lmstat -v information.
  2. lmutil lmstat -c license_file -a or lmutil lmstat -c license_server -a license information.
  3. lmutil lmstat -c license_file -i or lmutil lmstat -c license_server -i license features expiration date.

Dashboards

  1. Grafana Dashboard

Alerting

Prometheus rules

Prometheus rules for alerting with Prometheus Alertmanager.

groups:
- name: FlexLM
  rules:
  - alert: FlexLmServerDown
    expr: flexlm_server_status == 0
    for: 5m
    labels:
      severity: error
    annotations:
      summary: "Flexlm Error (instance {{ $labels.instance }})"
      description: "FlexLm {{ $labels.collector }} was not successful\n  VALUE = {{ $value }}\n  LABELS: {{ $labels }}"
  - alert: LicenceAvailable
    expr: 100*(flexlm_feature_used / flexlm_feature_issued) > 95
    for: 5m
    labels:
      severity: warning
    annotations:
      summary: "Licence Available Status (instance {{ $labels.instance }})"
      description: "Licence fully used \n  VALUE = {{ $value }}\n  LABELS: {{ $labels }}"
  - alert: LicenseExpiring
    expr: ((flexlm_feature_expiration_seconds - time()) / 86400) < 14
    for: 30m
    labels:
      severity: warning
    annotations:
      summary: License {{ $labels.app }} expiring soon on {{ $labels.instance }}
      description: License {{ $labels.app }} on {{ $labels.instance }} has {{ $labels.features }} features ({{ $labels.licenses }} licenses) expiring in {{ $value }} days

Contributing

Refer to CONTRIBUTING.md

License

Apache License 2.0, see LICENSE.

flexlm_exporter's People

Contributors

mjtrangoni avatar knweiss avatar treydock avatar mlky avatar stefankaufmann avatar tobiaskadelka avatar dependabot[bot] avatar 99rgosse avatar supersonicflea avatar peekjef72 avatar salibabadie 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.