Incorrect data from command line export?
Posted: Wed Dec 23, 2015 11:17 am
I am trying to find a way to export log information to file but when searching I found that exporting or reporting on the log data was not possible from within Nagios Log Server. I found at https://support.nagios.com/forum/viewto ... 37&t=34370 that the query can be entered at the command line and the results, ugly as they are, could be written to a file.
However, when attempting to do so the data returned does not match the data in the GUI. Here is my query:
My dashboard currently returns 5 items using this query. The output file indicates a total of 32,920,667 hits with only 12 actually included in the output file with none of them matching the criteria of the query. How can I successfully access this information and make it available to those requesting a report on whatever we are logging?
Also, the above referenced ticket indicates that reporting functionality is one of the most requested features. Are there any updates on when this will be available as without any sort of reporting or export ability it renders the data gathered virtually useless; just sending upper management a link to the GUI when they ask "give me a list of who accessed x between y and z?" probably won't go over very well
As always, any and all assistance is appreciated.
However, when attempting to do so the data returned does not match the data in the GUI. Here is my query:
Code: Select all
curl -XGET 'http://servername/index.php/api/backend/logstash-2015.12.23,logstash-2015.12.22/_search?pretty&token=xxxxxxx' -d '{
"query": {
"filtered": {
"query": {
"bool": {
"should": [
{
"query_string": {
"query": "searchitem*"
}
}
]
}
},
"filter": {
"bool": {
"must": [
{
"range": {
"@timestamp": {
"from": 1450799593626,
"to": 1450885993626
}
}
}
]
}
}
}
},
"highlight": {
"fields": {
"*": {}
},
"fragment_size": 2147483647,
"pre_tags": [
"@start-highlight@"
],
"post_tags": [
"@end-highlight@"
]
},
"size": 3000,
"sort": [
{
"@timestamp": {
"order": "desc",
"ignore_unmapped": true
}
},
{
"@timestamp": {
"order": "desc",
"ignore_unmapped": true
}
}
]
}'
Also, the above referenced ticket indicates that reporting functionality is one of the most requested features. Are there any updates on when this will be available as without any sort of reporting or export ability it renders the data gathered virtually useless; just sending upper management a link to the GUI when they ask "give me a list of who accessed x between y and z?" probably won't go over very well
As always, any and all assistance is appreciated.