The InfluxDB Monitoring extension allows HiveMQ to connect to an instance of InfluxDB for time series monitoring.
Installation
Installing the extension for HiveMQ is very easy:
- Unzip the downloaded zip file
- In the folder hivemq-influxdb-extension, modify the influxdb.properties file to fit your needs. Check that the mandatory properties [host, port] are set
- Copy the folder hivemq-influxdb-extension to your [HIVEMQ_HOME]/extensions folder
- Done
Configuration
The HiveMQ InfluxDB Monitoring Extension uses the influxdb.properties configuration file. The extension cannot start if this file is missing or the required properties are not set.
1 2 3 4 5 6 7 8 9 10 11 12 13 | mode:http host:localhost port:8086 protocol:http auth: prefix: database:hivemq reportingInterval:1 connectTimeout:5000 tags:host=hivemq1 |
If you do not have an InfluxDB instance set up, use the following procedure to start a not configured InfluxDB instance with Docker.
-
Download and install Docker for your platform
-
Start an InfluxDB docker container with the command docker run -p 8086:8086 -v $PWD:/var/lib/influxdb influxdb. For more information about using InfluxDB with Docker visit the official Docker repository for InfluxDB.
-
A local instance of InfluxDB should be running with the port for the database set to 8086.
-
Create a database that matches the name set in the property database in influxdb.properties. For the default database value use the command curl -G //localhost:8086/query –data-urlencode “q=CREATE DATABASE hivemq”.
-
Done
After the extension is installed and an InfluxDB instance exists.
-
Start HiveMQ
-
Extension successfully started if configuration file exists and contains required properties
I use influxdb 0.8.8 on debianI changed some of my stats name that sent to influxdb. Then I see influxdb eats lots of CPU, so I restart it, but it then refuse to listen on 2003 [graphite input] and 8086, so my grafana dashboards are all down, and I can not feed any data in.let 4528 be influxdb pid, When I do:lsof -p 4528I only see it listens 8090. When:sudo strace -p 4528 -f -s 500I see:[pid 4518] futex[0x14c2238, FUTEX_WAIT, 0, NULL [pid 5255] read[334, "\253\34\n\303\225\2\4\0\0\0\270\244\200\5\fS\210i\260\200\0\0\0\0\0\0\0\1\1@\353\0245\0\0\0 \0\0\0\0\0\0\276\263\200\5\fS\271"..., 32768] = 32768[pid 5255] brk[0x8408000] = 0x8408000[pid 5255] read[334, "~b.\304\346\0\4\342|\0\0\0\0\0\0\0\0\1\1\250;=5\0\0\0 \0\0\0\0\0\0+\273\200\5\fS\277\347\237@\0\0\0\0\0\0\0"..., 32768] = 32768[pid 5255] brk[0x8429000] = 0x8429000where 334 is:/opt/influxdb/shared/data/db/shard_db_v2/00114/MANIFEST-000006Anyone got any idea? I will cooperate if you need any other information.
--You received this message because you are subscribed to the Google Groups "InfluxDB" group.To unsubscribe from this group and stop receiving emails from it, send an email to influxdb+***@googlegroups.com.To post to this group, send email to ***@googlegroups.com.Visit this group at //groups.google.com/group/influxdb.To view this discussion on the web visit //groups.google.com/d/msgid/influxdb/a7e6fe96-c852-4e2d-8229-5fb3c937d600%40googlegroups.com.For more options, visit //groups.google.com/d/optout.
Post by l***@zhihu.comI use influxdb 0.8.8 on debianI changed some of my stats name that sent to influxdb. Then I see influxdb eats lots of CPU, so I restart it, but it then refuse to listen on 2003 [graphite input] and 8086, so my grafana dashboards are all down, and I can not feed any data in.lsof -p 4528sudo strace -p 4528 -f -s 500[pid 4518] futex[0x14c2238, FUTEX_WAIT, 0, NULL [pid 5255] brk[0x8408000] = 0x8408000[pid 5255] brk[0x8429000] = 0x8429000/opt/influxdb/shared/data/db/shard_db_v2/00114/MANIFEST-000006Anyone got any idea? I will cooperate if you need any other information.
By the way, I also turn on debug log, but there is not any debug, just info:[2015/01/13 17:25:12 CST] [INFO] [github.com/influxdb/influxdb/datastore.[*ShardDatastore].GetOrCreateShard:158] DATASTORE: opening or creating shard /opt/influxdb/shared/data/db/shard_db_v2/00071[2015/01/13 17:25:13 CST] [INFO] [github.com/influxdb/influxdb/datastore.[*ShardDatastore].GetOrCreateShard:158] DATASTORE: opening or creating shard /opt/influxdb/shared/data/db/shard_db_v2/00053[2015/01/13 17:25:14 CST] [INFO] [github.com/influxdb/influxdb/datastore.[*ShardDatastore].GetOrCreateShard:158] DATASTORE: opening or creating shard /opt/influxdb/shared/data/db/shard_db_v2/00043--You received this message because you are subscribed to the Google Groups "InfluxDB" group.To unsubscribe from this group and stop receiving emails from it, send an email to influxdb+***@googlegroups.com.To post to this group, send email to ***@googlegroups.com.Visit this group at //groups.google.com/group/influxdb.To view this discussion on the web visit //groups.google.com/d/msgid/influxdb/a45a7319-9269-4022-9ace-c52e6f7ea531%40googlegroups.com.For more options, visit //groups.google.com/d/optout.
By starting influxdb manually, I see:[01/13/15 17:51:35] [INFO] Redirectoring logging to stdout[01/13/15 17:51:35] [INFO] Starting Influx Server 0.8.8 bound to 0.0.0.0...[01/13/15 17:51:35] [INFO] Opening database at /opt/influxdb/shared/data/db[01/13/15 17:51:35] [INFO] Opening wal in /opt/influxdb/shared/data/wal[01/13/15 17:51:35] [INFO] Ssl will be disabled since the ssl port or certificate path weren't set[01/13/15 17:51:35] [INFO] Initializing Raft HTTP server[01/13/15 17:51:35] [INFO] Raft Server Listening at 0.0.0.0:8090[01/13/15 17:51:35] [INFO] Initializing Raft Server: //status:8090[01/13/15 17:51:36] [INFO] Recovering the cluster configuration[01/13/15 17:51:37] [INFO] Checking whether afbe90d99511bc13 is the local server afbe90d99511bc13[01/13/15 17:51:37] [INFO] DATASTORE: opening or creating shard /opt/influxdb/shared/data/db/shard_db_v2/00014Should influxdb listen all ports before open any shard? `recovering the cluster configuration` , but I only have one node.
--You received this message because you are subscribed to the Google Groups "InfluxDB" group.To unsubscribe from this group and stop receiving emails from it, send an email to influxdb+***@googlegroups.com.To post to this group, send email to ***@googlegroups.com.Visit this group at //groups.google.com/group/influxdb.To view this discussion on the web visit //groups.google.com/d/msgid/influxdb/815ee91f-b6a2-4131-9093-ef7a700f952b%40googlegroups.com.For more options, visit //groups.google.com/d/optout.
influxdb will only start listening after it opened the local database [andmaybe run some checks], all the "opening or creating shard" are influxdbloading the database, depending on database size it may take a few minutes.
Post by l***@zhihu.com[01/13/15 17:51:35] [INFO] Redirectoring logging to stdout[01/13/15 17:51:35] [INFO] Starting Influx Server 0.8.8 bound to 0.0.0.0...[01/13/15 17:51:35] [INFO] Opening database at/opt/influxdb/shared/data/db[01/13/15 17:51:35] [INFO] Opening wal in /opt/influxdb/shared/data/wal[01/13/15 17:51:35] [INFO] Ssl will be disabled since the ssl port orcertificate path weren't set[01/13/15 17:51:35] [INFO] Initializing Raft HTTP server[01/13/15 17:51:35] [INFO] Raft Server Listening at 0.0.0.0:8090[01/13/15 17:51:35] [INFO] Initializing Raft Server: //status:8090[01/13/15 17:51:36] [INFO] Recovering the cluster configuration[01/13/15 17:51:37] [INFO] Checking whether afbe90d99511bc13 is the localserver afbe90d99511bc13[01/13/15 17:51:37] [INFO] DATASTORE: opening or creating shard/opt/influxdb/shared/data/db/shard_db_v2/00014Should influxdb listen all ports before open any shard? `recovering thecluster configuration` , but I only have one node.
--You received this message because you are subscribed to the Google Groups "InfluxDB" group.To unsubscribe from this group and stop receiving emails from it, send an email to influxdb+***@googlegroups.com.To post to this group, send email to ***@googlegroups.com.Visit this group at //groups.google.com/group/influxdb.To view this discussion on the web visit //groups.google.com/d/msgid/influxdb/71e8738c-0ee4-4f84-9d44-caabd39b9965%40googlegroups.com.For more options, visit //groups.google.com/d/optout.
I encountered the same issue.When I restart influxdb, and strace `pidofinfluxdb` , it reads MANIFEST files stored in/opt/influxdb/shared/data/db/shard_db_v2/0000[1-4]/ sequentially, with eachsubdir of shared_db_v2 about 40GB and MANIFEST 75MB. But it take a longlong time to read these files, about 5secs reading 32KB.So I have to rm all the data stored in /opt/influxdb/shared/data/ in orderto accepting new data. Is there any idea that I can accelerate the readprocess without rm all data have been stored.圚 2015幎1月16日星期五 UTC+8äž‹åˆ6:23:48Julien Ammous写é“
Post by Julien Ammousinfluxdb will only start listening after it opened the local database [andmaybe run some checks], all the "opening or creating shard" are influxdbloading the database, depending on database size it may take a few minutes.
Post by l***@zhihu.com[01/13/15 17:51:35] [INFO] Redirectoring logging to stdout[01/13/15 17:51:35] [INFO] Starting Influx Server 0.8.8 bound to 0.0.0.0...[01/13/15 17:51:35] [INFO] Opening database at/opt/influxdb/shared/data/db[01/13/15 17:51:35] [INFO] Opening wal in /opt/influxdb/shared/data/wal[01/13/15 17:51:35] [INFO] Ssl will be disabled since the ssl port orcertificate path weren't set[01/13/15 17:51:35] [INFO] Initializing Raft HTTP server[01/13/15 17:51:35] [INFO] Raft Server Listening at 0.0.0.0:8090[01/13/15 17:51:35] [INFO] Initializing Raft Server: //status:8090[01/13/15 17:51:36] [INFO] Recovering the cluster configuration[01/13/15 17:51:37] [INFO] Checking whether afbe90d99511bc13 is the localserver afbe90d99511bc13[01/13/15 17:51:37] [INFO] DATASTORE: opening or creating shard/opt/influxdb/shared/data/db/shard_db_v2/00014Should influxdb listen all ports before open any shard? `recovering thecluster configuration` , but I only have one node.
--You received this message because you are subscribed to the Google Groups "InfluxDB" group.To unsubscribe from this group and stop receiving emails from it, send an email to influxdb+***@googlegroups.com.To post to this group, send email to ***@googlegroups.com.Visit this group at //groups.google.com/group/influxdb.To view this discussion on the web visit //groups.google.com/d/msgid/influxdb/7e22bae5-dff8-4453-8097-093b340e854c%40googlegroups.com.For more options, visit //groups.google.com/d/optout.
53857 1423052870.517830 read[9,"\3\1Y\314p\4\4\0\1Z\2\200\5\16\27,\367b@\0\0\0\n@:\323q\1\231\344\3219"...,32768] = 32768 53857 1423052872.122669 read[9,"\16\350WO\363\2\4\25\360\322\304@\0\0\0\4=r\350\221\1\0\0\0\0\0\0\0\0\313\271\224"...,32768] = 32768 53857 1423052873.579912 read[9,"\25i\330\222\354\2\4\0\0\0\0\330o\200\5\16\0270\212\351@\0\0\0\nS\315\201\321\1C]"...,32768] = 32768 53857 1423052877.165614 read[9, "&\301b\37\362\2\4\367v\0\0\0\0\0\0\0\1\200\5\16\0273X\23\0\0\0\0\n\\@"..., 32768] = 3276853857 1423052878.702675 read[9, "+@K\177\20\1\4\0\0\0\0\0\0\0\0\0\0\0\0\1\17\254\200\5\16\25q\240\202\300\0"..., 32768] = 3276853857 1423052880.131541 read[9, "\314\255\26\20h\2\0041M!\1\0\0\0\0\0\0\0\0\0\0\0\0\2\27 \200\5\16\24\\"..., 32768] = 32768 53857 1423052881.295679 read[9,"=\f\212=\246\1\4d\3\237\377\17\267\202\201\1\0\0\0\0\0\0\356\254\200\5\16\24\372\325\276"..., 32768] = 32768 53857 1423052882.469207 read[9,"\363]\344\232Z\0\4\4\230\354\242\323\3d\0\243\202\20\227\243A\0\0\0\0\0\0\0b\200\5"..., 32768] = 32768 53857 1423052883.466626 read[9, "\350\326 \305\201\2\4\301\1}\21\3569\0\0\0\0\0\0\0\0\0\356\306\200\5\16\27;\202\207"..., 32768] = 32768 53857 1423052885.240128 read[9,"Y\352\343\261\376\0\4d\3\330\207\20\260\203\201\1\0\0\0\0\0\1\177\227\200\5\16\26\212l\252"..., 32768] = 32768 53857 1423052886.407411 read[9,"\205\f\202\212|\1\4:@\0\0\0\n_\236\32\261\1\271c\31:\0\0\0\0\0\0\0\0\3"..., 32768] = 32768 53857 1423052888.152448 read[9, "kO\363w\321\0\4\221\1\0\0\0\0\0\0\0\0\0\0\0\0\0:J\200\5\16\26V\202B"..., 32768] = 32768 53857 1423052889.408376 read[9, "N\352\7\25.\1\4\204\2757\0\0\0\0\0\0\0\0\1\321\362\200\5\16\27@\376V@\0\0"..., 32768] = 32768 53857 1423052890.927421 read[9, "\27\264\355\357\242\0\4\3641\0\0\0\0\0\5\fi\200\5\16\26\377O&\300\0\0\0\tMD"..., 32768] = 3276853857 1423052892.705504 read[9,"h\301\217\254\201\0\0043\200\0\0\0\0*k\256!\1\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 32768] = 32768 53857 1423052894.550791 read[9,"@\301g\321\222\1\4\0278\362f\200\0\0\0\n\200\327\201\201\1\35\307d:\0\0\0\0\0\0"..., 32768] = 32768 53857 1423052896.484048 read[9,"v^\271^\267\0\4\1\345\336\6;\0\0\0\225\353\243\340\2\267\321\240\330\3d\4\354\233\20\204\256"...,32768] = 32768 53857 1423052898.267902 read[9,"r7\330+\363\0\4\364\274\327\330\3d\4\314\236\20\256\250\201\1\0\0\0\0\0\0\327}\200\5"..., 32768] = 32768 53857 1423052899.695743 read[9,"\5,\364\f\321\0\4\0\0\0\253]\200\5\16\26h\335\367\300\0\0\0\6\301\250\202\321\1t\4\340"...,32768] = 32768 53857 1423052901.076852 read[9, "8\264\177\346\223\4\4\0\0\0\0\0\2w\201\200\5\16\26rH\333@\0\0\0\6\354[\7\21"..., 32768] = 3276853857 1423052903.181401 read[9,"Bh\324H\33\1\4\0\0\0\0\0\1\311z\200\5\16\22?\23\217\200\0\0\0\3\22.\321A\1"...,32768] = 32768 53857 1423052904.777502 read[9,"U9\231\277\236\1\4\0\0\0\0\267\201\230\333\3d\4\230\252\20\342\233\201\1\0\0\0\0\0\0"..., 32768] = 32768 53857 1423052906.736916 read[9,"\266C\33\204G\5\4\6\3\277\240\20d\3\203\255\20\341\220\201\1\0\0\0\0\0\2\0351\200\5"..., 32768] = 32768 53857 1423052908.272562 read[9,"\251D\247\357\5\0\4\264\324\341\242\3\324\\\246\347\275\3\1\t\0\3\214\260\20\4\252\241\332\334\3\6"...,32768] = 32768 53857 1423052909.717778 read[9,"\271\v\365\\y\1\4\0\0\0\0\3\323\200\5\16\27E\0331\200\0\0\0\n\301\267\2411\1A\7"...,32768] = 32768 53857 1423052911.055007 read[9, "\301\273\245\230w\3\4\0\0\0\0\0\0\0\0011\240\200\5\16\27T\346\305\300\0\0\0\v\25\307"..., 32768] =32768 53857 1423052912.667950 read[9, "\262I\367\237\312\4\4\r{;\0\0\0\0\0\0\0\0\2t\247\200\5\16\26\273\37\30\300\0\0"..., 32768] = 3276853857 1423052914.065325 read[9,"\372\366\230\347\221\1\4\27/\246\7\200\0\0\0\nO\230\25\201\1^\351\3649\0\0\0\0\0\0"..., 32768] = 32768 53857 1423052916.138218 read[9,"`\2477\35\337\3\4\26\225'?\200\0\0\0\7\254\210\257Q\1\34H\3663\0\0\0\0\0\0"..., 32768] = 32768 53857 1423052917.676900 read[9,"\215\335\375v\263\0\4\0\336\212\220\261\3\361\324\217\340\3d\3\204\301\20\200\261R\0\0\0\0\0"..., 32768] = 32768 53857 1423052919.061766 read[9,"N\362}g:\1\4\316\0\0\0\0\v3\367\20\361\1k\275\373;\0\0\0 \0\0\0\0\0\1"...,32768] = 32768 53857 1423052920.794786 read[9,"\4\340\214%\1\1\4\302\341\3d\1\314\306\20\232\214\200\1\0\0\0\0\0\1\351H\200\5\16\27"..., 32768] = 32768 53857 1423052922.942379 read[9,"\377j\v\230u\2\4\0\0\0\0\3\376\363\200\5\16\27_\222\30\200\0\0\0\vQ\214v\1\1F"...,32768] = 32768 53857 1423052924.882256 read[9,"\266x!1^\1\4\27]c\333@\0\0\0\n,\244T\201\1\351c\2459\0\0\0\0\253\317\330"...,32768] = 32768 53857 1423052926.489940 read[9, "\273_\273cI\2\4\317\20\311\220y\0\0\0\0\0\0ip\200\5\16\27Y\"%\200\0\0\0"..., 32768] = 32768 53857 1423052928.664775 read[9,"\35u