Hi
I have a stream of text files which contain regular application logs info. All the events are writing line by line. One event starts with [ Event name] and then next lines give some description, timestamp, ....so on.
I want to add these txt files to NLS using shipper.py
cat /mnt/logs/app1.txt | python shipper.py program:apache_access | nc <NLS_IP> 2057
My question is, just for txt content input, what would be the program type? can I use "import_json" as the type? How can we identify which type we want to use in NLS ?
cat /mnt/logs/app1.txt | python shipper.py import_json | nc <NLS_IP> 2057, is this correct?
Thank you
Luke
most suitable program type
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: most suitable program type
You want to use the raw import because the json import expects the logs to be in json format, so the port would be 2056
You can use this format
In the command above you can change import_raw to any text you want without spaces, which will identify the type of logs so you can search them more easily
You can use this format
Code: Select all
cat /mnt/logs/app1.txt | python shipper.py program:import_raw | nc <NLS_IP> 2056