This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.opennms.netmgt.snmp; | |
import java.io.IOException; | |
import java.nio.ByteBuffer; | |
import org.opennms.netmgt.snmp.snmp4j.Snmp4JAgentConfig; | |
import org.snmp4j.MessageDispatcherImpl; | |
import org.snmp4j.TransportMapping; | |
import org.snmp4j.mp.MPv3; | |
import org.snmp4j.security.USM; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -H "Content-Type: application/json" --data @query.json http://0.0.0.0:8080/measuements/localhost:chassis:temps | |
where query.json contains: | |
{ | |
"interval": "300s", | |
"datasources": [ | |
{ | |
"label" : "temperature", | |
"source" : "temperature", | |
"function" : "AVERAGE", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface DetectorFactory<T extends Detector> { | |
T createDetector(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global: | |
external_labels: | |
monitor: 'odl-monitor' | |
scrape_configs: | |
# Scrape Prometheus itself. | |
- job_name: 'prometheus' | |
scrape_interval: 5s | |
static_configs: | |
- targets: ['localhost:9090'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
export OPENNMS_RPM_ROOT=/tmp/docker_bamboo | |
mkdir -p $OPENNMS_RPM_ROOT | |
pushd $OPENNMS_RPM_ROOT | |
PLAN_KEY="OPENNMS-ONMS1240" | |
BUILD_ID="2" | |
RPM_VERSION="19.0.0-0.20170114.onms1240.features.strict.attribute.types.2" | |
rm -f *.rpm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"interval": "300s", | |
"datasources": [ | |
{ | |
"label": "ds1", | |
"source": "inlet", | |
"function": "AVERAGE", | |
"heartbeat": "600s" | |
} | |
], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Increase the default JMS timeout to 2 minute | |
org.opennms.jms.timeout = 120000 | |
# Increase the number of RPC threads (unlimited) | |
org.opennms.ipc.rpc.threads=1 | |
org.opennms.ipc.rpc.queue.max=-1 | |
org.opennms.ipc.rpc.threads.max=65536 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import re | |
m = re.search('-XOutFile (.*?) ', ' '.join(sys.argv)) | |
open(m.group(1), "w").close() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (ts : table.rowKeySet()) { sum = 0; for (column : table.columnKeySet()) { if (column != "timestamp" ) { sum = table.get(ts, column) + sum;} }; table.put(ts, "SUM", sum); } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget -qO /opt/opennms/jetty-webapps/hawtio.war https://oss.sonatype.org/content/repositories/public/io/hawt/hawtio-default/1.4.63/hawtio-default-1.4.63.war && \ | |
unzip /opt/opennms/jetty-webapps/hawtio.war -d /opt/opennms/jetty-webapps/hawtio && rm -f /opt/opennms/jetty-webapps/hawtio.war |
OlderNewer