Installing InfluxDB on AIX

I just finished porting the latest InfluxDB version 1.8.3 to AIX. You can find it as usual at https://www.power-devops.com/influxdb, download and install it. Let's take a look at the installation process.


First of all, if you plan to use InfluxDB for real data, not just test it, create a separate filesystem /var/lib/influxdb or even 3 filesystems:

  • /var/lib/influxdb/meta - for metadata

  • /var/lib/influxdb/data - for your data

  • /var/lib/influxdb/wal - for write-ahead logs

Another thing to consider before installing are user and group IDs. InfluxDB runs under the user influxdb with the group influxdb. If you work in an enterprise environment with strict rules for UIDs/GIDs you want to create the group and the user before installing the package. Otherwise the group and the user will be created for you with the first available IDs.


Now we are ready to install the package and it is as easy, as AIX:


# curl -L -O https://dl.power-devops.com/powerdevops.influxdb.1.8.3.1.bff.gz
# gunzip powerdevops.influxdb.1.8.3.1.bff.gz
# installp -acgXYd powerdevops.influxdb.18.3.1.bff all

If everything runs smoothly, you will be able to see the installed fileset:


# lslpp -L powerdevops.influxdb.rte
  Fileset                      Level  State  Type  Description (Uninstaller)
  ----------------------------------------------------------------------------
  powerdevops.influxdb.rte   1.8.3.1    C     F    Distributed time-series
                                                   database.

You might want to change some settings in /etc/influxdb/influxdb.conf. E.g., tweak some security or performance parameters. You can find more about InfluxDB configuration in the official documentation.


Let's start and test our installation.


# /etc/rc.d/init.d/influxdb start

Download sample data:


# curl https://s3.amazonaws.com/noaa.water-database/NOAA_data.txt -o NOAA_data.txt

Create the sample database:


# influx -precision rfc3339 -execute 'CREATE DATABASE NOAA_water_database'

and fill it with the data:


# influx -import -path=NOAA_data.txt -precision=s -database=NOAA_water_database

Now we can open the database and examine the data:


# influx -precision rfc3339 -database=NOAA_water_database
Connected to http://localhost:8086 version 1.8.3
InfluxDB shell version: 1.8.3

> SHOW measurements;
name: measurements
name
----
average_temperature
h2o_feet
h2o_pH
h2o_quality
h2o_temperature

> SELECT COUNT("water_level") FROM h2o_feet;
name: h2o_feet
time                 count
----                 -----
1970-01-01T00:00:00Z 15258

> SELECT * FROM h2o_feet LIMIT 5;
name: h2o_feet
time                 level description    location     water_level
----                 -----------------    --------     -----------
2019-08-17T00:00:00Z below 3 feet         santa_monica 2.064
2019-08-17T00:00:00Z between 6 and 9 feet coyote_creek 8.12
2019-08-17T00:06:00Z below 3 feet         santa_monica 2.116
2019-08-17T00:06:00Z between 6 and 9 feet coyote_creek 8.005
2019-08-17T00:12:00Z below 3 feet         santa_monica 2.028
>

Now you can connect your InfluxDB to Grafana and make some nice graphs. Or watch youtube videos of Nigel Griffiths and setup his amazing njmon/nimon to monitor your AIX environment.


Don't forget to add InfluxDB to the server's startup:


# ln -s /etc/rc.d/init.d/influxdb /etc/rc.d/rc2.d/Sinfluxdb
# ln -s /etc/rc.d/init.d/influxdb /etc/rc.d/rc2.d/Kinfluxdb

Happy hacking!


P.S. If you have any notes to InfluxDB on AIX, just write a comment down or contact us. If you need help installing or managing InfluxDB on AIX, we are glad to help you.



  • YouTube
  • Black Facebook Icon

©2019-2020 by Power-Devops.com