Re: To Pull Historical report from nagios Log
Posted: Fri Sep 01, 2017 8:54 am
Is there a way to convert UNIX epoch Time to human readable time from Nagios Log server end ??
Support for Nagios products and services
https://support.nagios.com/forum/
Code: Select all
curl -XGET 'http://sesklnglsidv01/nagioslogserver/api/backend/logstash-2017.05.16,logstash-2017.05.15/_search?pretty&token=0fe304665e40fb35fdb796eef532df3a079e44a6' -d '{
"query": {
"filtered": {
"query": {
"bool": {
"should": [
{
"query_string": {
"query": "*"
}
}
]
}
},
"filter": {
"bool": {
"must": [
{
"range": {
"@timestamp": {
"from": "2017-05-15T13:49:57.000Z",
"to": "2017-05-16T13:49:57.000Z"
}
}
}
]
}
}
}
},
"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
}
}
]
}'
{
"query": {
"range" : {
"@timestamp" : {
"gte": "now-16h/h",
"lte": "now-1h/h"
}
}
}
}