1
0
mirror of https://github.com/Oxalide/vsphere-influxdb-go.git synced 2023-10-10 13:36:51 +02:00

The tool was not able to gather info from the datacenters in nested folders under the root folder - fixed, added config parameter to specify prefix for measurement, cleaned up logging formatting

This commit is contained in:
Artashes Arabajyan 2018-01-03 21:06:41 +01:00
parent 942b49d61e
commit 8b519e50c8
3 changed files with 847 additions and 853 deletions

14
.gitignore vendored
View File

@ -1,13 +1 @@
### Basic ignore file *.swp
# Binaries for programs and plugins
vsphere-influxdb
# Test binary, build with `go test -c`
*.test
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
# Configuration file
vsphere-influxdb.json

File diff suppressed because it is too large Load Diff

View File

@ -1,76 +1,81 @@
{ {
"Domain": ".lab", "Domain": ".lab",
"Interval": 60, "Interval": 60,
"VCenters": [ "VCenters": [
{ "Username": "monitoring", "Password": "monixx", "Hostname": "vcenter-01.dc-01.lab" }, { "Username": "monitoring", "Password": "monixx", "Hostname": "vcenter-01.dc-01.lab" },
{ "Username": "monitoring", "Password": "monixx", "Hostname": "vcenter-01.dc-02.lab" }, { "Username": "monitoring", "Password": "monixx", "Hostname": "vcenter-01.dc-02.lab" },
{ "Username": "monitoring", "Password": "monixx", "Hostname": "vcenter-02.dc-02.lab" }, { "Username": "monitoring", "Password": "monixx", "Hostname": "vcenter-02.dc-02.lab" },
{ "Username": "monitoring", "Password": "monixx", "Hostname": "vcenter-01.home.lab" } { "Username": "monitoring", "Password": "monixx", "Hostname": "vcenter-01.home.lab" }
],
], "InfluxDB": {
"InfluxDB": { "Prefix": "vsphere_",
"Hostname": "http://influxdb-01.dc-01.lab:8086", "Hostname": "http://influxdb-01.dc-01.lab:8086",
"Username": "vm", "Username": "vm",
"Password": "vmware334", "Password": "vmware334",
"Database": "vmware_performance" "Database": "vmware_performance"
}, },
"Metrics": [
{ "Metrics": [
"ObjectType": [ "VirtualMachine", "HostSystem" ], {
"Definition": [ "ObjectType": [ "VirtualMachine", "HostSystem" ],
{ "Metric": "cpu.usage.average", "Instances": "*" }, "Definition": [
{ "Metric": "cpu.usage.maximum", "Instances": "*" }, { "Metric": "cpu.usage.average", "Instances": "*" },
{ "Metric": "cpu.usagemhz.average", "Instances": "*" }, { "Metric": "cpu.usage.maximum", "Instances": "*" },
{ "Metric": "cpu.usagemhz.maximum", "Instances": "*" }, { "Metric": "cpu.usagemhz.average", "Instances": "*" },
{ "Metric": "cpu.wait.summation", "Instances": "*" }, { "Metric": "cpu.usagemhz.maximum", "Instances": "*" },
{ "Metric": "cpu.system.summation", "Instances": "*" }, { "Metric": "cpu.wait.summation", "Instances": "*" },
{ "Metric": "cpu.ready.summation", "Instances": "*" }, { "Metric": "cpu.system.summation", "Instances": "*" },
{ "Metric": "mem.usage.average", "Instances": "*" }, { "Metric": "cpu.ready.summation", "Instances": "*" },
{ "Metric": "mem.usage.maximum", "Instances": "*" }, { "Metric": "mem.usage.average", "Instances": "*" },
{ "Metric": "mem.consumed.average", "Instances": "*" }, { "Metric": "mem.usage.maximum", "Instances": "*" },
{ "Metric": "mem.consumed.maximum", "Instances": "*" }, { "Metric": "mem.consumed.average", "Instances": "*" },
{ "Metric": "mem.active.average", "Instances": "*" }, { "Metric": "mem.consumed.maximum", "Instances": "*" },
{ "Metric": "mem.active.maximum", "Instances": "*" }, { "Metric": "mem.active.average", "Instances": "*" },
{ "Metric": "mem.vmmemctl.average", "Instances": "*" }, { "Metric": "mem.active.maximum", "Instances": "*" },
{ "Metric": "mem.vmmemctl.maximum", "Instances": "*" }, { "Metric": "mem.vmmemctl.average", "Instances": "*" },
{ "Metric": "mem.totalCapacity.average", "Instances": "*" }, { "Metric": "mem.vmmemctl.maximum", "Instances": "*" },
{ "Metric": "net.packetsRx.summation", "Instances": "*" }, { "Metric": "mem.totalCapacity.average", "Instances": "*" },
{ "Metric": "net.packetsTx.summation", "Instances": "*" }, { "Metric": "net.packetsRx.summation", "Instances": "*" },
{ "Metric": "net.throughput.usage.average", "Instances": "*" }, { "Metric": "net.packetsTx.summation", "Instances": "*" },
{ "Metric": "net.received.average", "Instances": "*" }, { "Metric": "net.throughput.usage.average", "Instances": "*" },
{ "Metric": "net.transmitted.average", "Instances": "*" }, { "Metric": "net.received.average", "Instances": "*" },
{ "Metric": "net.throughput.usage.nfs.average", "Instances": "*" }, { "Metric": "net.transmitted.average", "Instances": "*" },
{ "Metric": "datastore.numberReadAveraged.average", "Instances": "*" }, { "Metric": "net.throughput.usage.nfs.average", "Instances": "*" },
{ "Metric": "datastore.numberWriteAveraged.average", "Instances": "*" }, { "Metric": "datastore.numberReadAveraged.average", "Instances": "*" },
{ "Metric": "datastore.read.average", "Instances": "*" }, { "Metric": "datastore.numberWriteAveraged.average", "Instances": "*" },
{ "Metric": "datastore.write.average", "Instances": "*" }, { "Metric": "datastore.read.average", "Instances": "*" },
{ "Metric": "datastore.totalReadLatency.average", "Instances": "*" }, { "Metric": "datastore.write.average", "Instances": "*" },
{ "Metric": "datastore.totalWriteLatency.average", "Instances": "*" }, { "Metric": "datastore.totalReadLatency.average", "Instances": "*" },
{ "Metric": "mem.capacity.provisioned.average", "Instances": "*"}, { "Metric": "datastore.totalWriteLatency.average", "Instances": "*" },
{ "Metric": "cpu.corecount.provisioned.average", "Instances": "*" } { "Metric": "mem.capacity.provisioned.average", "Instances": "*"},
] { "Metric": "cpu.corecount.provisioned.average", "Instances": "*" }
}, ]
{ },
"ObjectType": [ "VirtualMachine" ],
"Definition": [ {
{ "Metric": "datastore.datastoreVMObservedLatency.latest", "Instances": "*" } "ObjectType": [ "VirtualMachine" ],
] "Definition": [
}, { "Metric": "datastore.datastoreVMObservedLatency.latest", "Instances": "*" }
{ ]
"ObjectType": [ "HostSystem" ], },
"Definition": [
{ "Metric": "disk.maxTotalLatency.latest", "Instances": "" }, {
{ "Metric": "disk.numberReadAveraged.average", "Instances": "*" }, "ObjectType": [ "HostSystem" ],
{ "Metric": "disk.numberWriteAveraged.average", "Instances": "*" }, "Definition": [
{ "Metric": "net.throughput.contention.summation", "Instances": "*" } { "Metric": "disk.maxTotalLatency.latest", "Instances": "" },
] { "Metric": "disk.numberReadAveraged.average", "Instances": "*" },
}, { "Metric": "disk.numberWriteAveraged.average", "Instances": "*" },
{ { "Metric": "net.throughput.contention.summation", "Instances": "*" }
"ObjectType": [ "Datastore" ], ]
"Definition": [ },
{ "Metric": "disk.capacity.latest", "Instances": "*" },
{ "Metric": "disk.used.latest", "Instances": "*" } {
] "ObjectType": [ "Datastore" ],
} "Definition": [
] { "Metric": "disk.capacity.latest", "Instances": "*" },
{ "Metric": "disk.used.latest", "Instances": "*" }
]
}
]
} }