Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does the grafana-agent output the OS version? #2442

Closed
nick-wvu opened this issue Oct 27, 2022 · 7 comments
Closed

Does the grafana-agent output the OS version? #2442

nick-wvu opened this issue Oct 27, 2022 · 7 comments
Labels
frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed.

Comments

@nick-wvu
Copy link

Does the agent output the OS type/version. For example RHEL 8.

@marctc
Copy link
Contributor

marctc commented Oct 27, 2022

AFAIK it displays the OS (linux, windows, etc) but not the distribution.

./agent -version
agent, version  (branch: , revision: )
  build user:
  build date:
  go version:       go1.18.3
  platform:         linux/amd64

What's the use case?

@nick-wvu
Copy link
Author

nick-wvu commented Oct 27, 2022

Thank you for your reply, I should have added more info.
Does it send any of that to prometheus? I'm looking to make a table in grafana to display OS name/version.

@tpaschalis
Copy link
Member

Hey Nick! I suppose you mean the OS type and version of the host system that's running the Agent, right? The Agent's internal metrics do not include this information about the host system by default.

If your hosts are some flavor of Linux, you can use the node_exporter integration with the os collector which parses /etc/os-release or /usr/lib/os-release to retrieve this information. Take some time to read through the documentation to see the available list of collectors, as well as advice on how to set up the exporter correctly if you plan on running it on Docker or Kubernetes.

For macOS, the os collector is not implemented yet, but is tracked on this upstream ticket. For Windows machines you can use the equivalent windows_exporter which does have an os equivalent collector.

@nick-wvu
Copy link
Author

Does the grafana-agnet use the os collector from the node_exporter?

@tpaschalis
Copy link
Member

Yes, the os collector is enabled by default when using node_exporter.

You can use the set_collectors key to run only this collector, if you don't need the other ones from the default set.

@nick-wvu
Copy link
Author

OK, thank you. Any chance you happen to have the metric handy?
I don't see anything like node_os_info like there is for windows

integrations:
  agent:
    enabled: true
  node_exporter:
    enabled: true

@marctc
Copy link
Contributor

marctc commented Jan 30, 2023

The metric names are node_os_info and node_os_version. I'm going to close the tickets unless there's anything agent specific further to discuss here.

@marctc marctc closed this as completed Jan 30, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in Grafana Agent (Public) Jan 30, 2023
@github-actions github-actions bot added the frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. label Feb 22, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed.
Projects
No open projects
Development

No branches or pull requests

4 participants