Add Grafana Alloy configuration files and update examples
- Introduced detailed configuration guidelines in alloy.instructions.md - Added general instructions for project structure in general.instructions.md - Created config.yaml for NAMU-PC with target hostnames - Implemented example.alloy and openwrt.alloy for service discovery and scraping - Added alloy_seed.json for initial configuration state - Developed demo.alloy for comprehensive monitoring setup - Established std.alloy for repository path formatting and host configuration loading - Updated test.alloy to utilize new host configuration loading
This commit is contained in:
5
OpenWRT/config.yaml
Normal file
5
OpenWRT/config.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
NAMU-PC:
|
||||
targets:
|
||||
- hostname: r1.kv40.kkarolis.lt
|
||||
- hostname: r2.kv40.kkarolis.lt
|
19
OpenWRT/example.alloy
Normal file
19
OpenWRT/example.alloy
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
import.file "openwrt" {
|
||||
filename = "./openwrt.alloy"
|
||||
}
|
||||
|
||||
openwrt.openwrt {
|
||||
forward_to = [prometheus.remote_write.metrics_service.receiver]
|
||||
}
|
||||
|
||||
prometheus.remote_write "metrics_service" {
|
||||
endpoint {
|
||||
url = "https://prometheus-prod-24-prod-eu-west-2.grafana.net/api/prom/push"
|
||||
|
||||
basic_auth {
|
||||
username = "1257735"
|
||||
password = sys.env("GCLOUD_RW_API_KEY")
|
||||
}
|
||||
}
|
||||
}
|
7
OpenWRT/openwrt.alloy
Normal file
7
OpenWRT/openwrt.alloy
Normal file
@@ -0,0 +1,7 @@
|
||||
declare "openwrt" {
|
||||
argument "forward_to" {
|
||||
optinal = false
|
||||
comment = "Where to forward the scraped metrics"
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user