Nagios Log Dashboard for ESXI Hosts
Posted: Wed Apr 19, 2017 7:44 am
Hi I have added ESXi source to Nagios log server. I would like to create the dashboard based on the message where in I can find the VCenter information .
Dashboard to be split based on Number of Host connected vCenter . Each change we perform has the vCenter Name provided. Each ESXi logsource under Program “FDM” (log) provides the vCenter Information for which the below Elastic search query can be used .
In the Query the ""query": "*SESKWRESVC01" SESKWRESVC01 is the Vcenter name .Instead is there a common phrase that i can use in query to fetch the Vcenter information ?
Dashboard to be split based on Number of Host connected vCenter . Each change we perform has the vCenter Name provided. Each ESXi logsource under Program “FDM” (log) provides the vCenter Information for which the below Elastic search query can be used .
Code: Select all
curl -XGET 'http://sesklnglsipd01/nagioslogserver/api/backend/logstash-2017.04.19,logstash-2017.04.18/_search?pretty&token=330c628dd3e2b82de24b83a2a025c0b3d598c9d0' -d '{
"query": {
"filtered": {
"query": {
"bool": {
"should": [
{
"query_string": {
"query": "*SESKWRESVC01"
}
}
]
}
},
"filter": {
"bool": {
"must": [
{
"range": {
"@timestamp": {
"from": 1492518959378,
"to": 1492605359378
}
}
}
]
}
}
}
},
"highlight": {
"fields": {
"*": {}
},
"fragment_size": 2147483647,
"pre_tags": [
"@start-highlight@"
],
"post_tags": [
"@end-highlight@"
]
},
"size": 250,
"sort": [
{
"@timestamp": {
"order": "desc",
"ignore_unmapped": true
}
},
{
"@timestamp": {
"order": "desc",
"ignore_unmapped": true
}
}
]
}'
In the Query the ""query": "*SESKWRESVC01" SESKWRESVC01 is the Vcenter name .Instead is there a common phrase that i can use in query to fetch the Vcenter information ?