Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/spokeywheeler/informix-text-exporter
Prometheus Exporter for Informix that uses the Node Exporter Textfile Collector
https://github.com/spokeywheeler/informix-text-exporter
Last synced: 20 days ago
JSON representation
Prometheus Exporter for Informix that uses the Node Exporter Textfile Collector
- Host: GitHub
- URL: https://github.com/spokeywheeler/informix-text-exporter
- Owner: SpokeyWheeler
- License: mit
- Created: 2019-07-29T08:40:57.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-30T21:14:58.000Z (almost 4 years ago)
- Last Synced: 2023-03-09T08:41:42.829Z (almost 2 years ago)
- Language: Shell
- Size: 55.7 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.com/SpokeyWheeler/informix-text-exporter.svg?branch=master)](https://travis-ci.com/SpokeyWheeler/informix-text-exporter)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/4aa4d0c7e27844268b58b30939333f77)](https://www.codacy.com/gh/SpokeyWheeler/informix-text-exporter/dashboard?utm_source=github.com&utm_medium=referral&utm_content=SpokeyWheeler/informix-text-exporter&utm_campaign=Badge_Grade)
[![CodeFactor](https://www.codefactor.io/repository/github/spokeywheeler/informix-text-exporter/badge)](https://www.codefactor.io/repository/github/spokeywheeler/informix-text-exporter)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FSpokeyWheeler%2Finformix-text-exporter.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2FSpokeyWheeler%2Finformix-text-exporter?ref=badge_shield)# informix-text-exporter
Prometheus Exporter for Informix that uses the Node Exporter Textfile Collector
## Usage
Add a cron job that runs every minute for `/path/to/informix-text-runner.sh`
The implementation of Prometheus and the Node Exporter is left as an exercise
for the reader.Dependencies:
* Prometheus
* Node Exporter
* jq
* CSDK 😕## Configuration of the Exporter
This JSON file is called `config.json` and needs to be in the
`informix-text-exporter` directory. The content is a key-value pair describing
the path to the node exporter textfile collector directory. The key is called
`textfile_path` and the default path in Linux is `/var/lib/node_exporter/textfile_collector`.A sample config, `config.json.sample`, is provided.
## Static Labels
You can create a set of static labels that will be applied to every single
metric. For example, let's assume you have an HDR cluster of servers in each
state in the US and you want to track which specific server this metric is for.
You could have a static label file on each box that specifies something
like `informix_hostname=informix-..foo.com`, e.g.
`informix_hostname="informix-02.mn.foo.com"`The file should be called `static_labels` and needs to be in the
`informix-text-exporter` directory.A sample set of static labels,`static_labels.sample`, is provided.
## Metric Configuration File Layout
This should be a JSON file, containing the following keys and associated values:
`metricname` (e.g. `customer_count`)
`frequency` put the number of times per hour to run this, valid values are 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60 (e.g. `1`)
`help` put the help line for metricname here (e.g. `This is the number of customers`)
`type` put the data type for metricname here (e.g. `gauge`)
`database` name of the database to run your SQL against here (e.g. `stores`)
`sql` select goes here (e.g. `select count(*) from customers`)
A sample metrics configuration file, `metrics.json.sample`, is provided.
## Limitations
Currently, only one `metricname` per `sql`.
There should probably be some sensible defaults for things that aren't provided.