-
Notifications
You must be signed in to change notification settings - Fork 379
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
What's wrong?
adding the text_file collector result in a bug where alloy is trying to enable dns collector even if this one isn't included in the config :
Error: C:\Program Files\GrafanaLabs\Alloy\config.alloy:5:1: Failed to build component: building component: error build collector dns: unknown sub collector: . Possible values: metrics, wmi_stats
4 |
5 | prometheus.exporter.windows "default" {
| _^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6 | | enabled_collectors = ["text_file", "cpu", "logical_disk", "net", "service","system", "memory", "iis", "mssql", "scheduled_task", "process", "tcp"]
7 | |
8 | | logical_disk {
9 | | exclude = "test"
10 | | }
11 | | network {
12 | | exclude = "test"
13 | | }
14 | | process {
15 | | exclude = "test"
16 | | }
17 | | service {
18 | | exclude = "test"
19 | | }
20 | | iis {
21 | | app_exclude = "test"
22 | | }
23 | | mssql {
24 | | enabled_classes = ["bufman","databases","genstats","info","locks","memmgr","sqlerrors","sqlstats","transactions","waitstats"]
25 | | }
26 | | scheduled_task {
27 | | exclude = "test"
28 | | }
29 | | tcp {
30 | | enabled_list = ["metrics","connections_state"]
31 | | }
32 | | }
| |_^
33 |
Steps to reproduce
Use this prometheus.exporter.windows config :
prometheus.exporter.windows "default" {
enabled_collectors = ["text_file", "cpu", "logical_disk", "net", "service","system", "memory", "iis", "mssql", "scheduled_task", "process", "tcp"]
logical_disk {
exclude = "test"
}
network {
exclude = "test"
}
process {
exclude = "test"
}
service {
exclude = "test"
}
iis {
app_exclude = "test"
}
mssql {
enabled_classes = ["bufman","databases","genstats","info","locks","memmgr","sqlerrors","sqlstats","transactions","waitstats"]
}
scheduled_task {
exclude = "test"
}
tcp {
enabled_list = ["metrics","connections_state"]
}
}
System information
Windows 10 Pro 22H2
Software version
Alloy 1.9.2
Configuration
// ####################################
// Windows Server Metrics Configuration
// ####################################
prometheus.exporter.windows "default" {
enabled_collectors = ["text_file", "cpu", "logical_disk", "net", "service","system", "memory", "iis", "mssql", "scheduled_task", "process", "tcp"]
logical_disk {
exclude = "test"
}
network {
exclude = "test"
}
process {
exclude = "test"
}
service {
exclude = "test"
}
iis {
app_exclude = "test"
}
mssql {
enabled_classes = ["bufman","databases","genstats","info","locks","memmgr","sqlerrors","sqlstats","transactions","waitstats"]
}
scheduled_task {
exclude = "test"
}
tcp {
enabled_list = ["metrics","connections_state"]
}
}
prometheus.remote_write "send_to_prom" {
endpoint {
url = "http:/adresse:9090/api/v1/write"
}
}
prometheus.scrape "default" {
targets = prometheus.exporter.windows.default.targets
forward_to = [prometheus.remote_write.send_to_prom.receiver]
}
// ####################################
// Windows Server Logs Configuration
// ####################################
loki.source.windowsevent "task_scheduler_events" {
eventlog_name = "Microsoft-Windows-TaskScheduler/Operational"
forward_to = [loki.process.endpoint.receiver]
}
loki.source.windowsevent "system_events" {
eventlog_name = "System"
use_incoming_timestamp = true
forward_to = [loki.process.endpoint.receiver]
}
loki.process "endpoint" {
forward_to = [loki.write.endpoint.receiver]
stage.json {
expressions = {
message = "",
Overwritten = "",
source = "",
computer = "",
level = "",
event_id = "",
eventRecordID = "",
task = "",
channel = "",
componenet_id = "",
execution_processId = "execution.processId",
execution_processName = "execution.processName",
}
}
stage.structured_metadata {
values = {
"eventRecordID" = "",
"channel" = "",
"event_id" = "",
"task" = "",
"level" = "",
"componenet_id" = "",
"execution_processId" = "",
"execution_processName" = "",
}
}
stage.eventlogmessage {
source = "message"
overwrite_existing = true
}
stage.labels {
values = {
"service_name" = "source",
}
}
stage.output {
source = "message"
}
}
loki.write "endpoint" {
endpoint {
url = "http:/adresse:3100/loki/api/v1/push"
}
}
livedebugging {
enabled = true
}
Logs
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working