Page 1 of 1

most suitable program type

Posted: Sun Sep 30, 2018 10:25 pm
by lukedevon
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

Re: most suitable program type

Posted: Mon Oct 01, 2018 9:17 am
by scottwilkerson
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

Code: Select all

cat /mnt/logs/app1.txt | python shipper.py program:import_raw | nc <NLS_IP> 2056
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