|
|
@ -5,4 +5,37 @@ systemctl start grafana-server |
|
|
|
|
|
|
|
firewall-cmd --zone=public --permanent --add-port=3000/tcp |
|
|
|
sleep 10 |
|
|
|
# curl 'http://admin:admin@localhost:3000/api/datasources' -X POST -H 'Content-Type:application/json;charset=UTF-8' --data-binary '{"name":"OpenNMS","type":"opennms","access":"proxy","url":"http://localhost:8980/opennms","isDefault":true,"basicAuth":true,"basicAuthUser":"admin","basicAuthPassword":"admin"}' |
|
|
|
curl -v --basic -XPOST 'admin:admin@localhost:3001/api/plugins/opennms-helm-app/settings?enabled=true' -d '' |
|
|
|
curl 'http://admin:admin@localhost:3000/api/datasources' -X POST -H 'Content-Type:application/json;charset=UTF-8' --data-binary '{"name":"OpenNMS","type":"opennms","access":"proxy","url":"http://localhost:8980/opennms","isDefault":true,"basicAuth":true,"basicAuthUser":"admin","basicAuthPassword":"admin"}' |
|
|
|
|
|
|
|
curl -u admin:admin -XPOST "http://localhost:3000/api/plugins/opennms-helm-app/settings" -d "id=opennms-helm-app&enabled=true" 2>/dev/null |
|
|
|
|
|
|
|
cat <<EOF > data-performance.json |
|
|
|
{ |
|
|
|
"name": "opennms-performance", |
|
|
|
"type": "opennms-helm-performance-datasource", |
|
|
|
"access": "proxy", |
|
|
|
"url": "http://localhost:8980/opennms", |
|
|
|
"basicAuth": true, |
|
|
|
"basicAuthUser": "admin", |
|
|
|
"basicAuthPassword": "admin" |
|
|
|
} |
|
|
|
EOF |
|
|
|
|
|
|
|
curl -u admin:admin -H 'Content-Type: application/json' -XPOST -d @data-performance.json http://localhost:3000/api/datasources |
|
|
|
rm data-performance.json |
|
|
|
|
|
|
|
cat <<EOF > data-fault.json |
|
|
|
{ |
|
|
|
"name": "opennms-fault", |
|
|
|
"type": "opennms-helm-fault-datasource", |
|
|
|
"access": "proxy", |
|
|
|
"url": "http://localhost:8980/opennms", |
|
|
|
"basicAuth": true, |
|
|
|
"basicAuthUser": "admin", |
|
|
|
"basicAuthPassword": "admin" |
|
|
|
} |
|
|
|
EOF |
|
|
|
|
|
|
|
curl -u admin:admin -H 'Content-Type: application/json' -XPOST -d @data-fault.json http://localhost:3000/api/datasources |
|
|
|
rm data-fault.json |