# Best way to define a variable with the CPU count on an agent

**URL:** <https://community.icinga.com/t/best-way-to-define-a-variable-with-the-cpu-count-on-an-agent/13348>\
**Category:** Icinga 2\
**Created:** [March 12, 2024, 4:08pm UTC](https://community.icinga.com/t/best-way-to-define-a-variable-with-the-cpu-count-on-an-agent/13348 "2024-03-12T16:08:36Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![rivad](https://community.icinga.com/user_avatar/community.icinga.com/rivad/32/5852_2.png) [@rivad](https://community.icinga.com/u/rivad)\
**Post date:** [March 13, 2024, 9:11am UTC](https://community.icinga.com/t/best-way-to-define-a-variable-with-the-cpu-count-on-an-agent/13348/6 "2024-03-13T09:11:11Z")

</div>

Have a look at this post: [How do I call the variable "service.state\_id" from a different host and service? - #5 by rivad](https://community.icinga.com/t/how-do-i-call-the-variable-service-state-id-from-a-different-host-and-service/13246/5)

You could get the live output of one check (for example: [about-me](https://github.com/Linuxfabrik/monitoring-plugins/tree/main/check-plugins/about-me)) to figure out the number of CPUs while constructing the arguments of your check\_procs command.

---

_[View the full topic](https://community.icinga.com/t/best-way-to-define-a-variable-with-the-cpu-count-on-an-agent/13348)._
