Skip to content

pbrane/PromSNMP

Repository files navigation

PromSNMP promsnmp-build

promSnmpCast

👩‍🏭 Build from source

Check out the source code with

git clone https://github.com/pbrane/PromSNMP.git

Compile and assemble the JAR file including the test suite

make

Build a Docker container image in your local registry

make oci

🕹️ Run the application

Start the application locally

java -jar target/promsnmp-*.jar

Start the application using Docker

docker run -it --init --rm -p "8082:8080/tcp" local/promsnmp:$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)

🔌 API Endpoints

The application exposes the following endpoints:

Endpoint Method Description
/promSnmp/hello GET Returns a simple "Hello World" response
/promSnmp/sample GET Returns sample Prometheus metrics from static file
/promSnmp/router GET Returns router metrics from static file

🎢 Deployment playground

You can find in the development folder a stack with Prometheus and Grafana.

cd deployment
docker compose up -d

Endpoints:

Create and publish a new release

To make a release the following steps are required:

  1. Set the Maven project version without -SNAPSHOT
  2. Make a version tag with git
  3. Set a new SNAPSHOT version in the main branch
  4. Publish a release

To help you with these steps you can run a make goal make release. It requires a version number you want to release. As an example the current main branch has 0.0.2-SNAPSHOT and you want to release 0.0.2 you need to run

make release RELEASE_VERSION=0.0.2

The 0.0.2 version is set with the git tag v0.0.2. It will automatically set the main branch to 0.0.3-SNAPSHOT for the next iteration. All changes stay in your local repository. When you want to publish the new released version you need to run

git push                # Push the main branch with the new -SNAPSHOT version
git push origin v0.0.2  # Push the release tag which triggers the build which publishes artifacts.

About

Prometheus SNMP Export Container

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 3

  •  
  •  
  •