Skip to content

Commit

Permalink
Extend available options to prometheus-webhook-snmp (#14)
Browse files Browse the repository at this point in the history
* Extend available options to prometheus-webhook-snmp

Related: STF-559

* Adjust Dockerfile to conform to hadolint checks

* Set pip installation version

* Various fixes for linting and build warnings

- Complete clean up of the linting and verify everything continues to
  build
- Clean up the Dockerfile for python package updates which were just
  being overridden by the requirements-built.txt

* Use proper .hadolint.yaml file

* Don't Dockerfile lint error on info
  • Loading branch information
leifmadsen authored Feb 27, 2023
1 parent ba085f9 commit 1452aea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/linters/.hadolint.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
failure-threshold: warning
ignored:
- DL3041
- DL3013
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ ENV SNMP_HOST="localhost"
ENV SNMP_RETRIES=5
ENV SNMP_TIMEOUT=1
ENV ALERT_OID_LABEL="oid"
ENV TRAP_OID_PREFIX="1.3.6.1.4.1.50495.15"
ENV TRAP_DEFAULT_OID="1.3.6.1.4.1.50495.15.1.2.1"
ENV TRAP_DEFAULT_SEVERITY=""

EXPOSE 9099

CMD ["sh", "-c", "/usr/local/bin/prometheus-webhook-snmp --debug --snmp-port=$SNMP_PORT --snmp-host=$SNMP_HOST --snmp-community=$SNMP_COMMUNITY --alert-oid-label=$ALERT_OID_LABEL run"]
CMD ["sh", "-c", "/usr/local/bin/prometheus-webhook-snmp --debug --snmp-port=$SNMP_PORT --snmp-host=$SNMP_HOST --snmp-community=$SNMP_COMMUNITY --snmp-retries=$SNMP_RETRIES --snmp-timeout $SNMP_TIMEOUT --alert-oid-label=$ALERT_OID_LABEL --trap-oid-prefix=$TRAP_OID_PREFIX --trap-default-oid=$TRAP_DEFAULT_OID --trap-default-severity=$TRAP_DEFAULT_SEVERITY run"]

0 comments on commit 1452aea

Please sign in to comment.