vzaigrin / UniversalStorageCollector

tool for gathering performance information from different storage system
19 stars 2 forks source link

Multiple influxdb databases #3

Closed eschek87 closed 7 years ago

eschek87 commented 7 years ago

Is it possible to specify/define more than one influxdb database? At the moment i have created one database and the metrics from vnx and vplex are in this database.

And i have seen that the metrics did not have a "tag" name in influxdb:

show series key

2-1-A,class=vplex,name=vplex-test 2-1-B,class=vplex,name=vplex-test be-prt.read,class=vplex,name=vplex-test,parentName=2-1-A be-prt.read,class=vplex,name=vplex-test,parentName=2-1-B be-prt.write,class=vplex,name=vplex-test,parentName=2-1-A be-prt.write,class=vplex,name=vplex-test,parentName=2-1-B

vzaigrin commented 7 years ago

Unfortunately, all storage systems output to one database at InfluxDB. But, output from VPLEX and VNX wiil have different class tag.

eschek87 commented 7 years ago

Ok thanks. But the biggest problem is that all values got saved as "string":

SHOW FIELD KEYS name: 2-1-A fieldKey fieldType


director.be-ops string director.be-ops-read string director.be-ops-write string director.be-read string director.be-write string director.busy string director.fe-ops string director.fe-ops-act string director.fe-ops-q string director.fe-ops-read string director.fe-ops-write string director.fe-read string director.fe-write string

vzaigrin commented 7 years ago

Yes, they are string. What type they should have?

eschek87 commented 7 years ago

I think they should be "int" or? Cause if i try to create my query in influx i got the following:

SELECT mean(director.busy) FROM "2-1-A" ERR: unsupported mean iterator type: *influxql.stringInterruptIterator

Without "mean" i got all values from all the time.

vzaigrin commented 7 years ago

'Int' is not a good idea. A lot of metrics are float. I will change output to InfluxDB from String to Float.

eschek87 commented 7 years ago

The same affects the vnx data in influxdb

eschek87 commented 7 years ago

Is it possible to include: SP Read Cache State Enabled SP Write Cache State Enabled So with influxdb as datasource i could create a singlestat panel with the text

vzaigrin commented 7 years ago

Yes, it is possible just by changing config file.

For VNX1: In the vnxblock extractor common parameters add to the method cache this strings into paramlist: <param>SP Read Cache State</param> <param>SP Write Cache State</param>

For VNX2: In the vnxblock extractor common parameters add to the method cache2 this strings into paramlist: <param>SPA Read Cache State</param> <param>SPA Write Cache State</param> <param>SPB Read Cache State</param> <param>SPB Write Cache State</param> And change line cmd from "cache -sp -info -perfData" to "cache -sp -info"

But in this case it will be hard to change output type from 'String' to 'Float'.

eschek87 commented 7 years ago

ok. i wanted to switch to influxdb cause it can store "strings" and graphite cannot. I tried it but i got:

in /var/log/carbon/listener.log ) received from client 127.0.0.1:49612, ignoring.block.cache.spa.ReadCacheState 1486647160 ) received from client 127.0.0.1:49612, ignoring.block.cache.spa.WriteCacheState 1486647160 ) received from client 127.0.0.1:49614, ignoring.block.cache.spa.ReadCacheState 1486647160 ) received from client 127.0.0.1:49614, ignoring.block.cache.spa.WriteCacheState 1486647160 ) received from client 127.0.0.1:49612, ignoring.block.cache.spb.ReadCacheState 1486647160 ) received from client 127.0.0.1:49612, ignoring.block.cache.spb.WriteCacheState 1486647160 ) received from client 127.0.0.1:49614, ignoring.block.cache.spb.ReadCacheState 1486647160 ) received from client 127.0.0.1:49614, ignoring.block.cache.spb.WriteCacheState 1486647160

vzaigrin commented 7 years ago

No, this is other problem. When you will run naviseccli command you will see that outputs are very different even for one command. Sometime it separate value by "=", sometime by ":" For getting values from naviseccli output I match numbers and discard all other. I forgot about this when I advised how to get status of the cache. I will change Collector to get not only numbers as output.

vzaigrin commented 7 years ago

I have updated collector. Now it outputs strings from VNXBlock. Numbers to InfluxDB outputs as Double, but you need clean old values from database as it remembers type of previous values.

eschek87 commented 7 years ago

Thank you for the modification! I tried to find out what causes the error. I modified a file to get more information, but this did not helped me:

]/02/2017 20:56:24 :: invalid line - [ vnx.prz-vnx.block.cache.spa.ReadCacheState Enabled 1486673773 ) received from client 127.0.0.1:54744, ignoring.block.cache.spa.WriteCacheState Enabled 1486673773 ]/02/2017 20:56:24 :: invalid line - [ vnx.prz-vnx.block.cache.spa.WriteCacheState Enabled 1486673773 09/02/2017 20:56:25 :: MetricLineReceiver connection with 127.0.0.1:54740 closed cleanly ) received from client 127.0.0.1:54744, ignoring.block.cache.spb.ReadCacheState Enabled 1486673773 ]/02/2017 20:56:27 :: invalid line - [ vnx.prz-vnx.block.cache.spb.ReadCacheState Enabled 1486673773 ) received from client 127.0.0.1:54744, ignoring.block.cache.spb.WriteCacheState Enabled 1486673773 ]/02/2017 20:56:27 :: invalid line - [ vnx.prz-vnx.block.cache.spb.WriteCacheState Enabled 1486673773

Have you any idea?

vzaigrin commented 7 years ago

It's looks like Carbon doesn't accept Strings as values. In the InfluxDB I saw Strings for this values.

eschek87 commented 7 years ago

Yes in influxdb it works. Is it possible to send the data to influxdb in another order/sequence? At the moment its in the following order: director.per-cpu-busy,class=vplex,name=vplex-test,parentName=1-1-A

So i need to do the query in the following way 2017-02-10 10_50_33-grafana - vplex test

But i wanted to do "from director-name" and as field key the per cpu busy.

vzaigrin commented 7 years ago

At the present time parentName is a 'director name'. I did this for unification. Do you need simple 'per-cpu-busy' (without 'deirector.') as a metric name?

eschek87 commented 7 years ago

No. With director name is ok. But the metrics for the directors should be stored under the director name as a field key. I think using graphite is easier. Thanks for your help