Go to file
Mark Nellemann f04645f636 Improve documentation - add image. 2020-12-07 10:57:27 +01:00
doc More refactoring work, from Groovy to plain Java. 2020-10-11 12:25:55 +02:00
gradle/wrapper Initial code commit 2020-08-07 08:13:48 +02:00
src Cleanup code. 2020-12-01 11:48:05 +01:00
.editorconfig Support for configuration file and multiple HMC's. 2020-08-13 17:50:26 +02:00
.gitattributes Initial code commit 2020-08-07 08:13:48 +02:00
.gitignore Cleanup code. 2020-12-01 11:48:05 +01:00
LICENSE Added LICENSE information 2020-08-18 13:49:48 +02:00
README.md Improve documentation - add image. 2020-12-07 10:57:27 +01:00
bitbucket-pipelines.yml Refactoring work for more Java compatibility and static compilation. 2020-10-09 10:20:50 +02:00
build.gradle Update 3rd party build deps. 2020-12-01 11:47:54 +01:00
gradle.properties Bump version, 2020-12-01 11:54:48 +01:00
gradlew Initial code commit 2020-08-07 08:13:48 +02:00
gradlew.bat Initial code commit 2020-08-07 08:13:48 +02:00
settings.gradle Initial code commit 2020-08-07 08:13:48 +02:00

README.md

HMC Insights

HMCi is a utility that collects metrics from one or more IBM Power HMC systems. The metrics data is processed and saved into an InfluxDB time-series database. Grafana is used to visualize the metrics from InfluxDB.

Metrics includes Managed Systems (the physical Power servers) and Logical Partitions (the virtualized servers) running AIX, Linux and IBM-i (AS/400).

architecture

Installation and Setup

HMC Setup Instructions

  • Login to your HMC
  • Navigate to Users and Security
  • Create a new read-only hmci user, which will be used to connect to the REST API.
  • Click Manage User Profiles and Access, edit the newly created hmci user and click User Properties:
    • Enable Allow remote access via the web
    • Set Session timeout in minutes to 0
  • Navigate to HMC Mangement and Console Settings
  • Click Change Performance Monitoring Settings:
    • Enable Performance Monitoring Data Collection for Managed Servers: All On
    • Set Performance Data Storage to 1 day or more

InfluxDB and Grafana Setup Instructions

Install InfluxDB on an LPAR or other server, which is network accessible by the HMCi utility (the default InfluxDB port is 8086). You can install Grafana on the same server or any server which are able to connect to the InfluxDB database. The Grafana installation needs to be accessible from your browser. The default settings for both InfluxDB and Grafana will work fine as a start.

HMCi Installation Instructions

  • Ensure you have correct date/time and NTPd running to keep it accurate!
  • The only requirement for hmci is the Java runtime, version 8 (or later)
  • Install HMCi from downloads (rpm, deb or jar) or build from source
  • Copy the doc/hmci.toml configuration example into /etc/hmci.toml and edit the configuration to suit your environment. The location of the configuration file can be changed with a flag when running hmci.
  • Run the bin/hmci program in a shell, as a @reboot cron task or setup a proper service :)
  • When started, hmci will try to create the InfluxDB database named hmci, if not found.
  • Configure Grafana to communicate with your InfluxDB and import dashboards from the doc/ folder into Grafana (The dashboards are slightly modified versions of the dashboard provided by the nmon2influxdb tool)

Notes

InfluxDB

Examples on how to change the default InfluxDB retention policy for the hmci database:

 ALTER RETENTION POLICY "autogen" ON "hmci" DURATION 156w
 ALTER RETENTION POLICY "autogen" ON "hmci" DURATION 90d

Development Information

You need Java (JDK) version 8 or later to build hmci.

Build & Test

Use the gradle build tool, which will download all required dependencies:

./gradlew clean build

Local Testing

InfluxDB container

Start the InfluxDB container:

docker run --name=influxdb --rm -d -p 8086:8086 influxdb

To execute the Influx client from within the container:

docker exec -it influxdb influx

Grafana container

Start the Grafana container, linking it to the InfluxDB container:

docker run --name grafana --link influxdb:influxdb --rm -d -p 3000:3000 grafana/grafana:7.1.3

Setup Grafana to connect to the InfluxDB container by defining a new datasource on URL http://influxdb:8086 named hmci.

The hmci database must be created beforehand, which can be done by running the hmci tool first.

Grafana dashboards can be imported from the doc/ folder.