Files
2026-04-09 13:05:27 +02:00

35 lines
1.0 KiB
Bash

curl -X POST http://admin:admin@grafana:3000/api/datasources -H "Content-Type: application/json" -d '{
"name": "DS_WAZUH_INDEXER",
"type": "elasticsearch",
"access": "proxy",
"url": "https://wazuh.indexer:9200",
"basicAuth": true,
"basicAuthUser": "admin",
"secureJsonData": {
"basicAuthPassword": "SecretPassword"
},
"jsonData": {
"index": "wazuh-*",
"timeField": "timestamp",
"tlsSkipVerify": true,
"logMessageField": "rule.description",
"logLevelField": "rule.level"
}
}'
curl -X POST http://admin:admin@grafana:3000/api/dashboards/db \
-H "Content-Type: application/json" \
-d '{
"dashboard": '"$(cat /grafana/dashboards/wazuh.json)"',
"folderId": 0,
"overwrite": true
}'
curl -X POST http://admin:admin@grafana:3000/api/dashboards/db \
-H "Content-Type: application/json" \
-d '{
"dashboard": '"$(cat /grafana/dashboards/zabbix-server.json)"',
"folderId": 0,
"overwrite": true
}'