Comments (9)
Hi @mikenowak,
Thanks for the suggestion. I had a look, and it looks like it should be quite straightforward. Initially, I'd say we would only expose name and state, the other properties seem less useful. Do you agree about that?
from windows_exporter.
Hi @carlpett,
Agreed, yes - thats pretty much all that I am after.
from windows_exporter.
Alright, I have a working prototype now. Some choices made:
- I went with the service name instead of the display name, which makes it somewhat less easy to parse (
name="igfxcuiservice1.0.0.0"
...), but I think there is no guarantee that a display name is unique. - I'm lower-casing everything
- I expose the start_mode as a separate metric, which should make for easy alerting if something isn't in the state you want it to.
Example output:
# HELP wmi_service_start_mode The start mode of the service (StartMode)
# TYPE wmi_service_start_mode gauge
wmi_service_start_mode{name="aelookupsvc",start_mode="manual"} 1
wmi_service_start_mode{name="alg",start_mode="manual"} 1
wmi_service_start_mode{name="aphidmonitorservice",start_mode="auto"} 1
wmi_service_start_mode{name="appidsvc",start_mode="manual"} 1
[...]
# HELP wmi_service_state The state of the service (State)
# TYPE wmi_service_state gauge
wmi_service_state{name="aelookupsvc",state="running"} 1
wmi_service_state{name="alg",state="stopped"} 1
wmi_service_state{name="aphidmonitorservice",state="running"} 1
wmi_service_state{name="appidsvc",state="stopped"} 1
Looks ok?
from windows_exporter.
Hi @mikenowak and thanks for the suggestion. Our excellent @carlpett is already on the ball, reviewing his patch now!
from windows_exporter.
@mikenowak Could you give v0.1.3 a spin? We just pushed this release containing the service collector
from windows_exporter.
Good day @martinlindhe, @carlpett,
thank you for quick turnaround - truly outstanding!
I verified this to work on Win2013 R2 and Win2016 Server.
Here is one more question as my knowledge is incomplete because so far focused on gathering metrics rather than visualising data.
Is there any real benefit of the node_exporter approach (which exposes all the possible statuses for a given service and a gauge) versus solution implemented herein?
node_systemd_unit_state{name="syslog.service",state="activating"} 0
node_systemd_unit_state{name="syslog.service",state="active"} 0
node_systemd_unit_state{name="syslog.service",state="deactivating"} 0
node_systemd_unit_state{name="syslog.service",state="failed"} 0
node_systemd_unit_state{name="syslog.service",state="inactive"} 1
from windows_exporter.
@mikenowak It does not matter, as far as I am aware. Prometheus will consider any absent series as zero. However, the case could be made that it would be clearer to always expose all the series. It would also ensure that any other consumers of the endpoint (I'm aware of at least one other client) work the same, as I'm not sure if this is required behavior. I'll have a look at it.
from windows_exporter.
@mikenowak We merged an update which exposes all the states/start modes for clarity
from windows_exporter.
Thanks, confirmed to work as expected.
from windows_exporter.
Related Issues (20)
- Missing IIS Counter (perflibWebService)
- Can I drop specific labels within config.yml HOT 1
- Update Documentation To State That Existing Exporter Instance Have To Be Uninstalled For Changes To Occur
- Connector os cs and service are timing out HOT 2
- Custom performance counters
- How to query the correspondence between logical and physical disks HOT 1
- [MSSQL] Query duration stats
- CryptoAPI HOT 2
- How do I update windows exporter with config-file...using msiexec? more in-depth docs on using config file HOT 4
- /net/http/pprof were detected as information disclosure vulnerability
- Issue with scheduled_task HOT 1
- There is no Windows_os_* return on a certain Windows HOT 5
- How can we get CPU usage application-wise (IIS Worker Processes), for the Windows server? HOT 1
- Can windows print server monitoring data be collected? HOT 2
- Documentation: windows_time_computed_time_offset_seconds HOT 2
- in windows server 2012 r2 datacenter, the windows_exporter-0.25.1-amd64.exe has exception "the system cannot find the file specified"
- [requirements] IIS version number HOT 4
- How does windows_exporter monitor disk iowait HOT 2
- A single list in the Dashboard for Enabled/Disabled servers HOT 2
- Windows service collector takes over 500s to scrape data HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from windows_exporter.