hmci/README.md

57 lines
2.6 KiB
Markdown
Raw Normal View History

# HMC Insights
2020-09-01 07:50:44 +00:00
HMCi is a small utility to fetch metrics from one or more HMC's and push those to an InfluxDB time-series database.
2020-09-14 08:47:07 +00:00
*This project is in no way associated with, supported or endorsed by, International Business Machines Corporation (IBM).*
2020-09-03 15:25:28 +00:00
![screenshot](https://bitbucket.org/mnellemann/hmci/downloads/HMCi.png)
## Usage Instructions
2020-09-04 04:51:36 +00:00
- Ensure you have correct date/time and use a NTP service to keep it accurate!
- Install the HMCi package (*.deb* or *.rpm*) from [downloads](https://bitbucket.org/mnellemann/hmci/downloads/) or compile from source.
- Copy the *doc/hmci.tpml* configuration template into */etc/hmci.toml* and edit the configuration to suit your environment. You can use the *-c* option if you place this file elsewhere.
2020-09-04 04:51:36 +00:00
- Configure Grafana to communicate with your InfluxDB and import dashboards from *doc/* into Grafana (The dashboards are slightly modified versions of the dashboard provided by the nmon2influxdb tool).
2020-08-14 14:12:44 +00:00
- Run the *bin/hmci* program in a shell, as a @reboot cron task or setup a proper service :)
2020-09-04 04:51:36 +00:00
### InfluxDB and Grafana Packages
2020-09-04 04:51:36 +00:00
You can download [Grafana ppc64le](https://www.power-devops.com/grafana) and [InfluxDB ppc64le](https://www.power-devops.com/influxdb) packages for most Linux distributions and AIX on the [Power DevOps](https://www.power-devops.com/) site.
2020-09-01 07:50:44 +00:00
2020-09-04 04:51:36 +00:00
Binaries for amd64/x86 are available from the [Grafana website](https://grafana.com/grafana/download) and [InfluxDB website](https://portal.influxdata.com/downloads/) and also directly from your Linux distribution repository in some cases.
2020-09-01 07:50:44 +00:00
2020-09-04 04:51:36 +00:00
### Notes
2020-09-02 07:27:38 +00:00
2020-09-02 07:38:22 +00:00
Examples on how to change the default InfluxDB retention policy:
2020-09-02 07:27:38 +00:00
ALTER RETENTION POLICY "autogen" ON "hmci" DURATION 156w
ALTER RETENTION POLICY "autogen" ON "hmci" DURATION 90d
## Development Information
2020-08-14 14:12:44 +00:00
You need JDK version 8 or later.
### Build & Test
2020-09-02 07:38:22 +00:00
Use the gradle build tool, which will download all required dependencies.
./gradlew clean build
2020-09-02 07:38:22 +00:00
#### InfluxDB for local testing
Start the InfluxDB container
2020-08-13 09:48:00 +00:00
docker run --name=influxdb --rm -d -p 8086:8086 influxdb
To use the Influx client from the same container
docker exec -it influxdb influx
2020-09-02 07:38:22 +00:00
#### Grafana for local testing
Start the Grafana container, linking it to the InfluxDB container
2020-08-13 09:48:00 +00:00
docker run --name grafana --link influxdb:influxdb --rm -d -p 3000:3000 grafana/grafana:7.1.3
Configure a new InfluxDB datasource on *http://influxdb:8086* named *hmci* to connect to the InfluxDB container. The database must be created beforehand, this can be done by running the hmci tool first. Grafana dashboards can be imported from the *doc/* folder.