adejoux / nmon2influxdb

Make NMON data dynamic with InfluxDB
GNU Affero General Public License v3.0
80 stars 29 forks source link

Points Written, Error Thrown - default retention policy expected #60

Closed emespin closed 6 years ago

emespin commented 6 years ago

Hello, I'm really happy I found your tool- it looks to do exactly what we're looking for except I'm having some small issues in setup.

I have to admit I am not an influx expert, or an aix one at that- I'm actually setting this up to help out a coworker.

The issue I'm running into is when running the nmon2influx command, it confirms the writing of the points however it also returns an error:

[root@ecsvapp sample_nmon]# nmon2influxdb import linux_150818_1024.nmon # File linux_150818_1024.nmon imported : 17956 points ! 2018/02/12 18:49:59 {"error":"retention policy not found: default"}

After digging in it appears there is no retention policy named "default" created automatically when you create a DB w/ Influx, I guess the default is now named "autogen" to avoid confusion in their naming but even after creating a policy named "default" it still produces the error.

Anyways, thank you for all your help and work on this ahead of time I really appreciate it. Thanks!

adejoux commented 6 years ago

Hello,

Thanks. It seems to be a old bug from when Influxdb guys change the default policy name from "default" to "autogen".

So maybe you are using an old version of nmon2influxdb or you are using an old version of influxdb.

Can you give me the output of nmon2influxdb -h ?

Regards,

Alain

emespin commented 6 years ago

Sure no worries, here is the output:

Generating default configuration file : /home/admin/.nmon2influxdb.cfg NAME: nmon2influxdb - upload NMON stats to InfluxDB database

USAGE: nmon2influxdb [global options] command [command options] [arguments...]

VERSION: 0.9.0

AUTHOR(S): Alain Dejoux adejoux@djouxtech.net

COMMANDS: import import nmon files dashboard generate a dashboard from a nmon file or template stats generate stats from a InfluxDB metric list list InfluxDB metrics or measurements help, h Shows a list of commands or help for one command

GLOBAL OPTIONS: --server, -s "localhost" InfluxDB server and port --port, -p "8086" InfluxDB port --db, -d "nmon_reports" InfluxDB database --user, -u "root" InfluxDB administrator user --pass "root" InfluxDB administrator pass --debug debug mode [$NMON2INFLUXDB_DEBUG] --tz, -t "Europe/Paris" timezone --help, -h show help --version, -v print the version

Thank you, -EE

EDIT: I see what you mean, I just looked through the releases seems I have a version at least 2 years or so old, I'll try a newer release, my apologies!

adejoux commented 6 years ago

Hello,

Good news. Let me know if it's still not working :)