I have followed all the steps in https://wiki.onosproject.org/display/ONOS/InfluxDB+Report+and+Query+Application , but I can't integrate ONOS with InfluxDB.
After configuring all that's in the documentation, I execute "SHOW MEASUREMENTS" in InfluxDB and nothing is showing, because the database I created is empty, ONOS does not publish the metrics in it.
Is there anything any configuration file I must edit in order to run correctly?
Thank you so much for your help.
I tried the documentation, it has some missing information. Here is what i did:
My OS is Ubuntu:
yavuz@ubuntu:/opt/onos/apache-karaf-3.0.8/data/log$ uname -a
Linux ubuntu 4.4.0-83-generic #106-Ubuntu SMP Mon Jun 26 17:54:43 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
I've installed influxdb version 0.10.0
Note that ONOS supports InfluxDB up to 0.10.3. The InfluxDB which has higher version number will not work properly with ONOS.
curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -
source /etc/lsb-release
echo "deb https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
sudo apt-get update
sudo apt-get install influxdb=0.10.0+dfsg1-1
sudo service influxdb start
sudo apt-get install influxdb-client
Create onos database on influx
yavuz@ubuntu$ influx
Visit https://enterprise.influxdata.com to register for updates, InfluxDB server management, and monitoring.
Connected to http://localhost:8086 version 0.10.0
InfluxDB shell 0.10.0
CREATE DATABASE onos
use onos
CREATE USER onos WITH PASSWORD 'onos.password' WITH ALL PRIVILEGES
Now, influxdb is ready. Then, I installed ONOS 1.10.2:
cd /opt
sudo wget -c http://downloads.onosproject.org/release/onos-1.10.2.tar.gz
sudo tar xzf onos-1.10.2.tar.gz
sudo mv onos-1.10.2 onos
sudo /opt/onos/bin/onos-service start
Be sure to run ONOS with sudo, otherwise influxdb gives permission errors.
After getting ONOS console install influxdb feature: (this is missed in documentation)
feature:install onos-apps-influxdbmetrics
Activate application
app activate org.onosproject.influxdbmetrics
Last trick, default influxdb address is localhost and it causes parsing errors, you can set this value to 127.0.0.1
cfg set org.onosproject.influxdbmetrics.InfluxDbMetricsConfig address 127.0.0.1
You can tail the karaf.log to control if an error occurs during these steps. After few seconds, here is the query result
Hope this helps.