Parser Getting Started¶
In this chapter we will ship a new punch parser using the maven toolkit, and deploy it as part of a channel. You need maven and java installed on your laptop.
You also need access to the tahles inner source gitlab. Checkout the https://gitlab.thalesdigital.io/punch/parsers area and start installing the parser maven artefact project.
Once done, somewhere adequate for development, execute the following command:
mvn archetype:generate \
-DarchetypeGroupId=org.thales.punch \
-DarchetypeArtifactId=parser \
-DarchetypeVersion=1.0.0 \
-DgroupId=com.mycompany \
-DartifactId=myparser
cd myparser
mvn install
ls ~/.m2/repository/com/mycompany/myparser/1.0-SNAPSHOT/myparser-1.0-SNAPSHOT.zip
Have now a look at the myparser
channel. That parser indicates it needs the myparser-1.0-SNAPSHOT
package and refer to the enrich.punch and resource files provided by that package.
You should be able to start that parser. The simplest is to use the foreground command:
punchlinectl punchline.yaml
````
Use the injector file to try it:
```sh
punchplatform-log-injector.sh injector.json