Deleting data or retagging it

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Deleting data or retagging it

Post by eloyd »

We want to bring in some customer equipment logs to our NLS server but direct, real-time connectivity is not an option. So we looked at scp'ing log files over and importing them with shipper.py. Unfortunately, we did not realize (or maybe, did not think through properly?) that the data would be tagged as coming from import_json and that the host would be the local NLS host. It is important to us to know the host that the log information was generated from, since we want to use it for capacity planning purposes for each customer.

So the question is - is there a way to retag this data once it has been imported, or perhaps to delete it and import it again with the logsource identified as being the original machine and the timestamp being what's in the log file (instead of when it was imported)?

I'd really be interested in data management within NLS to be able to delete/roll-up records that are no longer relevant. Deleting this data would be a real good start, for instance, since it it basically useless but skewing our results.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Deleting data or retagging it

Post by sreinhardt »

I'm not sure if this is available in the present incarnation of shipper.py, but it is basically a necessity to be able to specify sending host and tag. I will put in a feature request now!
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Deleting data or retagging it

Post by eloyd »

Thanks. Any word on how to delete this data from our existing indicies?
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Deleting data or retagging it

Post by scottwilkerson »

There isn't a GUI version of this but you can do it fron the console on one of the cluster instances

Run the following replacing LOGSOURCE with the text of your logsource

Code: Select all

curl -XDELETE 'http://localhost:9200/logstash/_all/_query' -d '{
    "query" : {
        "term" : { "logsource" : "LOGSOURCE" }
    }
}'
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked