Grafana Agent with OSS Stack #4782
brngates98
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey all,
We have a local Grafana Stack implementation and we are moving away from telegraf/influxdb on machines collecting windows metrics to the Grafana Agent, with Mimir, and Loki.
I borrowed the integration dashboards from cloud for agent health and windows overview and logs. it works.
But i want to gather even more information, specifically data on running processes so we can then do some pattern matching when we have a process that crashes to find the root cause., how can i begin watching the windows processes with the agent?
Brand new to the agent so all ears on anything
This is my current Grafana Agent Configuration
`integrations:
prometheus_remote_write:
Add here any snippet that belongs to the
integrationssection.For a correct indentation, paste snippets copied from Grafana Cloud at the beginning of the line.
windows_exporter:
enabled: true
instance: palmtest # must match instance used in logs
relabel_configs:
- target_label: job
replacement: 'integrations/windows_exporter' # must match job used in logs
metric_relabel_configs:
- action: keep
regex: windows_cpu_time_total|windows_cs_hostname|windows_cs_logical_processors|windows_cs_physical_memory_bytes|windows_iis_current_connections|windows_logical_disk_free_bytes|windows_logical_disk_read_bytes_total|windows_logical_disk_size_bytes|windows_logical_disk_write_bytes_total|windows_net_bytes_total|windows_net_current_bandwidth|windows_os_info|windows_os_physical_memory_free_bytes|windows_service_status|windows_system_system_up_time
source_labels:
- name
agent:
enabled: true
relabel_configs:
- action: replace
source_labels:
- agent_hostname
target_label: instance
logs:
configs:
name: integrations
positions:
filename: ./positions.yaml
scrape_configs:
Add here any snippet that belongs to the
logs.configs.scrape_configssection.For a correct indentation, paste snippets copied from Grafana Cloud at the beginning of the line.
windows_events:
use_incoming_timestamp: true
bookmark_path: "./bookmarks-app.xml"
eventlog_name: "Application"
labels:
job: integrations/windows_exporter
instance: palmtest # must match instance used in windows_exporter
relabel_configs:
target_label: 'agent_hostname'
pipeline_stages:
expressions:
source: source
source:
windows_events:
use_incoming_timestamp: true
bookmark_path: "./bookmarks-app.xml"
eventlog_name: "System"
labels:
job: integrations/windows_exporter
instance: palmtest # must match instance used in windows_exporter
relabel_configs:
target_label: 'agent_hostname'
pipeline_stages:
expressions:
source: source
source:
journal:
max_age: 24h
labels:
instance: test
job: integrations/agent
pipeline_stages:
selector: '{unit!="grafana-agent.service"}'
action: drop
drop_counter_reason: only_keep_grafana_agent_logs
expression: "(level=(?P<log_level>[\s]*debug|warn|info|error))"
level: log_level
relabel_configs:
target_label: 'unit'
windows_events:
use_incoming_timestamp: true
bookmark_path: "./bookmarks-app.xml"
eventlog_name: "Application"
xpath_query: "*[System[Provider[@name='Grafana Agent']]]"
labels:
job: integrations/agent
relabel_configs:
target_label: 'instance'
target_label: unit
pipeline_stages:
expressions:
message: message
expression: "(level=(?P<log_level>[\s]*debug|warn|info|error))"
level: log_level
source: message
metrics:
configs:
remote_write:
scrape_configs:
Add here any snippet that belongs to the
metrics.configs.scrape_configssection.For a correct indentation, paste snippets copied from Grafana Cloud at the beginning of the line.
global:
scrape_interval: 60s
wal_directory: /tmp/grafana-agent-wal
`
Beta Was this translation helpful? Give feedback.
All reactions