Skip to content

Instantly share code, notes, and snippets.

View indigo423's full-sized avatar
🇩🇪
Hack the planet!

Ronny Trommer indigo423

🇩🇪
Hack the planet!
View GitHub Profile
@indigo423
indigo423 / Main.java
Created September 26, 2023 11:39
Test maximum number of Java threads
import java.util.ArrayList;
import java.util.List;
public class Main {
public static final int BATCH_SIZE = 4000;
public static void main(String[] args) {
List<Thread> threads = new ArrayList<Thread>();
try {
for (int i = 0; i <= 100 * 1000; i += BATCH_SIZE) {
@indigo423
indigo423 / LoginFailureRules.drl
Last active September 25, 2023 11:26
Drools Rule for SSHD syslog password audit
package org.opennms.netmgt.correlation.drools;
import java.util.Date;
import org.opennms.core.utils.InetAddressUtils;
import org.opennms.netmgt.correlation.drools.DroolsCorrelationEngine;
import org.opennms.netmgt.xml.event.Event;
import org.opennms.netmgt.xml.event.Parm;
import org.opennms.netmgt.model.events.EventBuilder;
import org.opennms.netmgt.model.events.EventUtils;
@indigo423
indigo423 / docker-compose.yml
Created May 10, 2023 16:07
Minion-NG docker-compose.yml
---
version: '3'
services:
bto-minion:
image: opennms/horizon-stream-minion:latest
# image: docker.io/opennms/horizon-stream-minion:v0.0.33-dev
environment:
TZ: 'Europe/Berlin'
MINION_ID: 'minion-ng-01'
@indigo423
indigo423 / opennms.snmp.trap.translator.events.xml
Created May 10, 2023 15:52
SNMP Authentitcation Trap enhancement
<event>
<mask>
<maskelement>
<mename>generic</mename>
<mevalue>4</mevalue>
</maskelement>
</mask>
<uei>uei.opennms.org/generic/traps/SNMP_Authen_Failure</uei>
<event-label>OpenNMS-defined trap event: SNMP_Authen_Failure</event-label>
<descr>&lt;p&gt;An authentication failure trap signifies that the sending protocol entity is the addressee of a
@indigo423
indigo423 / node-exporter.prom
Created February 6, 2023 12:10
Node Exporter example
# HELP go_gc_duration_seconds A summary of the pause duration of garbage collection cycles.
# TYPE go_gc_duration_seconds summary
go_gc_duration_seconds{quantile="0"} 2.2525e-05
go_gc_duration_seconds{quantile="0.25"} 2.2525e-05
go_gc_duration_seconds{quantile="0.5"} 5.352e-05
go_gc_duration_seconds{quantile="0.75"} 7.1375e-05
go_gc_duration_seconds{quantile="1"} 7.1375e-05
go_gc_duration_seconds_sum 0.00014742
go_gc_duration_seconds_count 3
# HELP go_goroutines Number of goroutines that currently exist.
@indigo423
indigo423 / bzflag-server.conf
Created September 12, 2022 17:13
BZflag DevJam
# This is a BZFlag Server (bzfs) configuration file.
# It assumes that you wish to connect to the bzflag list server.
# Please read through it carefully. Lines starting with a # are comments.
# to enable an option, remove the # at the beginning of a line. To
# disable that option, put the # back. There are some examples in this
# file. Make sure you change the examples if you uncomment the line. If
# you don't know what something does, you are okay to just leave
# it commented out. Failure to read through this file (looking for
# already uncommented lines) might be a little embarrassing. Have fun.
@indigo423
indigo423 / bzflag-server.conf
Created May 1, 2022 15:47
BZflag configuration
# This is a BZFlag Server (bzfs) configuration file.
# It assumes that you wish to connect to the bzflag list server.
# Please read through it carefully. Lines starting with a # are comments.
# to enable an option, remove the # at the beginning of a line. To
# disable that option, put the # back. There are some examples in this
# file. Make sure you change the examples if you uncomment the line. If
# you don't know what something does, you are okay to just leave
# it commented out. Failure to read through this file (looking for
# already uncommented lines) might be a little embarrassing. Have fun.
@indigo423
indigo423 / docker-compose.yaml
Created May 1, 2022 15:44
BZflag Docker Compose file
---
version: '3'
services:
bzfs:
image: quay.io/labmonkeys/bzfs:2.4.22.b20
container_name: bzfs
deploy:
resources:
limits:
@indigo423
indigo423 / threshold-rearmed.json
Last active March 17, 2022 12:32
SLA threshold rearmed
{
"nodeid": 1,
"parms": [
{
"parmName": "categoryName",
"value": "My-SLA-Category"
},
{
"parmName": "threshold",
"value": "80"
@indigo423
indigo423 / threshold-exceeded.json
Created March 17, 2022 12:30
SLA threshold exceeded
{
"nodeid": 1,
"parms": [
{
"parmName": "categoryName",
"value": "My-SLA-Category"
},
{
"parmName": "threshold",
"value": "80"