most suitable program type

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
lukedevon
Posts: 143
Joined: Sat Mar 24, 2018 9:15 am

most suitable program type

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: most suitable program type

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked