Hello,
I added a bunch of file monitors on a Linux server and i'd like to delete a few of them. How do I do this and is there a way to delete the data on the server as well?
Thanks!
Ryan
Linux file monitoring - how to delete
-
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Linux file monitoring - how to delete
You would need to modify the /etc/rsyslog.d/ config files. Depending on how you added those files, you may have lots of individual files or a single file. Deleting data from log server currently needs to be done from the command line and looks like:
You would want to change the 10.0.0.1 to the host ip or name you wish to remove. This will output the number of successful and failed removals. One thing to note is that close indeces will not have data removed, they will need to be reopened first.
Code: Select all
curl -XDELETE 'http://localhost:9200/logstash-*/_all/_query' -d '{
"query" : {
"term" : { "host" : "10.0.0.1" }
}
}'
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.
Re: Linux file monitoring - how to delete
Oh man, that's ugly. Any chance to add index/log management from the GUI? I mean, I love scripting curl requests all day, every day, but that's bound to introduce errors some day.
Re: Linux file monitoring - how to delete
I suppose that could be done. I suppose, even, that I could file a feature request for this. I suppose even further it could say something like:
and it would theoretically have the request ID 4434 in our internal feature requests queue.
Just a thought.
Code: Select all
Feature Request: Add logserver source removal scripts
Add ability to manage log entries per source, possibly with an auto-generated script that handles the syslog configs and phones home to alert NLS of the removal, similarly to how we offer setup scripts only in reverse.
Just a thought.
Former Nagios employee
Re: Linux file monitoring - how to delete
Oh, perchance to dream that there existed such a magical place as that which you describe.
Re: Linux file monitoring - how to delete
What a world that would be.
rhaig10695, I have filed a feature request for this. Did the curl solution work for you?
rhaig10695, I have filed a feature request for this. Did the curl solution work for you?
Former Nagios employee