Deleting host

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
carobell
Posts: 3
Joined: Wed Jul 17, 2019 10:39 am

Deleting host

Post by carobell »

To test if the log server was working I added the nagios server as a host, now I get all my logs for the localhost in double and can't figure out how to delete the double.

I used the scripts to install so everything is as the "default" installation scripts are configured.

Any help would be greatly appreciated.
Last edited by carobell on Wed Jul 17, 2019 12:30 pm, edited 1 time in total.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Deleting host

Post by scottwilkerson »

the following should remove it

Code: Select all

rm -f /etc/rsyslog.d/99-nagioslogserver.conf
systemctl restart rsyslog
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
carobell
Posts: 3
Joined: Wed Jul 17, 2019 10:39 am

Re: Deleting host

Post by carobell »

That seems to have taken care of it!

Unsurprisingly the old logs are still available, is there a way to only delete the logs of that one server ?

EDIT: I figured that, in my case, since I just started I would simply edit the "Snapshots & Maintenance" option "Delete indexes older than" to 1 so that I will simply have to wait until tomorrow for the unwanted logs to be deleted and reset the delete option afterwards.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Deleting host

Post by cdienger »

Another option would be to run a query like this:

Code: Select all

curl -XDELETE 'http://localhost:9200/logstash-*/_query?q=host:IP'
Where IP is the IP address of the host the records came from.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
carobell
Posts: 3
Joined: Wed Jul 17, 2019 10:39 am

Re: Deleting host

Post by carobell »

Thank you!

There's a

Code: Select all

'
missing at the end :)
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Deleting host

Post by cdienger »

Corrected. Thanks!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked