# Different parameters for the same check on a per host basis

**URL:** <https://discourse.sensu.io/t/different-parameters-for-the-same-check-on-a-per-host-basis/66>\
**Category:** Sensu Classic (EOL)\
**Created:** [August 1, 2013, 1:48pm UTC](https://discourse.sensu.io/t/different-parameters-for-the-same-check-on-a-per-host-basis/66 "2013-08-01T13:48:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Athanasios\_Kostopoul](https://avatars.discourse-cdn.com/v4/letter/a/838e76/32.png) [@Athanasios\_Kostopoul](https://discourse.sensu.io/u/Athanasios_Kostopoul)\
**Post date:** [August 1, 2013, 1:48pm UTC](https://discourse.sensu.io/t/different-parameters-for-the-same-check-on-a-per-host-basis/66/1 "2013-08-01T13:48:21Z")

</div>

Hi all,

I have the following perhaps trivial question but I have been going at it for a little while with no avail. I want to configure a load check with different parameters for the web server and some image processing servers. For example, the load on the image processing servers is almost always going to be higher than the webserver, and I want to configure different thresholds. I also want to monitor a number of databases with different names, which in essense is the same problem with parameters as before.

Any ideas on how I go around implementing this? A small detail is that I am using Chef to deploy sensu. Thanks for any suggestions!

---

<div class="post-metadata">

**Author:** ![Bethany\_Erskine](https://avatars.discourse-cdn.com/v4/letter/b/7ba0ec/32.png) [@Bethany\_Erskine](https://discourse.sensu.io/u/Bethany_Erskine)\
**Post date:** [August 1, 2013, 2:10pm UTC](https://discourse.sensu.io/t/different-parameters-for-the-same-check-on-a-per-host-basis/66/2 "2013-08-01T14:10:11Z")

</div>

Hi Athanasois,  
I would recommend defining those checks inside the appropriate cookbook using a [sensu\_check definition](https://github.com/sensu/sensu-chef#define-a-check) and use the `standalone` parameter. This way the check is defined on the client itself and you have the flexibility to change the check parameters on a per-recipe basis.

For the databases, you construct an array of database names, either using Chef search or manually, and wrap the sensu\_check definition in a .each loop to define the checks.

Bethany

> **···**
>
> On Thu, Aug 1, 2013 at 9:48 AM, Athanasios Kostopoulos [athanasioskostopoulos@gmail.com](mailto:athanasioskostopoulos@gmail.com) wrote:
> 
> > Hi all,  
> > I have the following perhaps trivial question but I have been going at it for a little while with no avail. I want to configure a load check with different parameters for the web server and some image processing servers. For example, the load on the image processing servers is almost always going to be higher than the webserver, and I want to configure different thresholds. I also want to monitor a number of databases with different names, which in essense is the same problem with parameters as before.
> 
> > Any ideas on how I go around implementing this? A small detail is that I am using Chef to deploy sensu. Thanks for any suggestions!
> 
> –  
> Bethany Erskine
> 
> DevOps Engineer
> 
> [http://www.paperlesspost.com](http://www.paperlesspost.com)

---

<div class="post-metadata">

**Author:** ![Athanasios\_Kostopoul](https://avatars.discourse-cdn.com/v4/letter/a/838e76/32.png) [@Athanasios\_Kostopoul](https://discourse.sensu.io/u/Athanasios_Kostopoul)\
**Post date:** [August 1, 2013, 2:14pm UTC](https://discourse.sensu.io/t/different-parameters-for-the-same-check-on-a-per-host-basis/66/3 "2013-08-01T14:14:22Z")

</div>

Hi Bethany,

thanks for thte quick reply. Is there a way to do it without using “standalone” checks? My understanding is that standalone checks do not show up on the dashboard, and this, for the sake of easy visual identification, I would like to avoid. The rest is clear to me and thanks!

> **···**
>
> On Thursday, August 1, 2013 4:10:11 PM UTC+2, Bethany Erskine wrote:
> 
> > Hi Athanasois,  
> > I would recommend defining those checks inside the appropriate cookbook using a [sensu\_check definition](https://github.com/sensu/sensu-chef#define-a-check) and use the `standalone` parameter. This way the check is defined on the client itself and you have the flexibility to change the check parameters on a per-recipe basis.
> 
> > 
> 
> > For the databases, you construct an array of database names, either using Chef search or manually, and wrap the sensu\_check definition in a .each loop to define the checks.
> 
> > 
> 
> > Bethany
> 
> > On Thu, Aug 1, 2013 at 9:48 AM, Athanasios Kostopoulos [athanasios...@gmail.com](mailto:athanasios...@gmail.com) wrote:
> > 
> > > Hi all,  
> > > I have the following perhaps trivial question but I have been going at it for a little while with no avail. I want to configure a load check with different parameters for the web server and some image processing servers. For example, the load on the image processing servers is almost always going to be higher than the webserver, and I want to configure different thresholds. I also want to monitor a number of databases with different names, which in essense is the same problem with parameters as before.
> 
> > > Any ideas on how I go around implementing this? A small detail is that I am using Chef to deploy sensu. Thanks for any suggestions!
> 
> > 
> 
> > –  
> > Bethany Erskine
> 
> > DevOps Engineer
> 
> > [http://www.paperlesspost.com](http://www.paperlesspost.com)

---

<div class="post-metadata">

**Author:** ![Bethany\_Erskine](https://avatars.discourse-cdn.com/v4/letter/b/7ba0ec/32.png) [@Bethany\_Erskine](https://discourse.sensu.io/u/Bethany_Erskine)\
**Post date:** [August 1, 2013, 2:35pm UTC](https://discourse.sensu.io/t/different-parameters-for-the-same-check-on-a-per-host-basis/66/4 "2013-08-01T14:35:49Z")

</div>

I think in that case it makes better sense to define a different load check for each subscriber role that needs different check parameters. Perhaps someone else on the list has a more elegant solution though?

> **···**
>
> On Thu, Aug 1, 2013 at 10:14 AM, Athanasios Kostopoulos [athanasioskostopoulos@gmail.com](mailto:athanasioskostopoulos@gmail.com) wrote:
> 
> > Hi Bethany,  
> > thanks for thte quick reply. Is there a way to do it without using “standalone” checks? My understanding is that standalone checks do not show up on the dashboard, and this, for the sake of easy visual identification, I would like to avoid. The rest is clear to me and thanks!
> > 
> > On Thursday, August 1, 2013 4:10:11 PM UTC+2, Bethany Erskine wrote:
> 
> > > Hi Athanasois,  
> > > I would recommend defining those checks inside the appropriate cookbook using a [sensu\_check definition](https://github.com/sensu/sensu-chef#define-a-check) and use the `standalone` parameter. This way the check is defined on the client itself and you have the flexibility to change the check parameters on a per-recipe basis.
> 
> > >
> 
> > > For the databases, you construct an array of database names, either using Chef search or manually, and wrap the sensu\_check definition in a .each loop to define the checks.
> 
> > >
> 
> > > Bethany
> 
> > > On Thu, Aug 1, 2013 at 9:48 AM, Athanasios Kostopoulos [athanasios...@gmail.com](mailto:athanasios...@gmail.com) wrote:
> > > 
> > > > Hi all,  
> > > > I have the following perhaps trivial question but I have been going at it for a little while with no avail. I want to configure a load check with different parameters for the web server and some image processing servers. For example, the load on the image processing servers is almost always going to be higher than the webserver, and I want to configure different thresholds. I also want to monitor a number of databases with different names, which in essense is the same problem with parameters as before.
> 
> > > > Any ideas on how I go around implementing this? A small detail is that I am using Chef to deploy sensu. Thanks for any suggestions!
> 
> > >
> 
> > > –  
> > > Bethany Erskine
> 
> > > DevOps Engineer
> 
> > > [http://www.paperlesspost.com](http://www.paperlesspost.com)
> 
> –  
> Bethany Erskine
> 
> DevOps Engineer
> 
> [http://www.paperlesspost.com](http://www.paperlesspost.com)

---

<div class="post-metadata">

**Author:** ![Sean\_Porter](https://avatars.discourse-cdn.com/v4/letter/s/7feea3/32.png) [@Sean\_Porter](https://discourse.sensu.io/u/Sean_Porter)\
**Post date:** [August 1, 2013, 5:50pm UTC](https://discourse.sensu.io/t/different-parameters-for-the-same-check-on-a-per-host-basis/66/5 "2013-08-01T17:50:21Z")

</div>

Hi Athanasios,

You can populate the client data with node specific threshold values, and then use those attributes with check command token substitution.

eg. “client”: {“load\_thresholds”: {“warning”: 8, “critical”: 12}} “checks”: {“check\_load”: {“command”: “check\_load.rb -w :::load\_thresholds.warning::: -c :::load\_thresholds.critical:::”}}

Sean.

> **···**
>
> On Thu, Aug 1, 2013 at 7:35 AM, Bethany Erskine [bethany@paperlesspost.com](mailto:bethany@paperlesspost.com) wrote:
> 
> > I think in that case it makes better sense to define a different load check for each subscriber role that needs different check parameters. Perhaps someone else on the list has a more elegant solution though?
> 
> –  
> Cheers,
> 
> Sean Porter
> 
> { blog: “[http://portertech.ca](http://portertech.ca/)”, projects: “[https://github.com/portertech](https://github.com/portertech)” }
> 
> On Thu, Aug 1, 2013 at 10:14 AM, Athanasios Kostopoulos [athanasioskostopoulos@gmail.com](mailto:athanasioskostopoulos@gmail.com) wrote:
> 
> > Hi Bethany,  
> > thanks for thte quick reply. Is there a way to do it without using “standalone” checks? My understanding is that standalone checks do not show up on the dashboard, and this, for the sake of easy visual identification, I would like to avoid. The rest is clear to me and thanks!
> > 
> > On Thursday, August 1, 2013 4:10:11 PM UTC+2, Bethany Erskine wrote:
> 
> > > Hi Athanasois,  
> > > I would recommend defining those checks inside the appropriate cookbook using a [sensu\_check definition](https://github.com/sensu/sensu-chef#define-a-check) and use the `standalone` parameter. This way the check is defined on the client itself and you have the flexibility to change the check parameters on a per-recipe basis.
> 
> > >
> 
> > > For the databases, you construct an array of database names, either using Chef search or manually, and wrap the sensu\_check definition in a .each loop to define the checks.
> 
> > >
> 
> > > Bethany
> 
> > > On Thu, Aug 1, 2013 at 9:48 AM, Athanasios Kostopoulos [athanasios...@gmail.com](mailto:athanasios...@gmail.com) wrote:
> > > 
> > > > Hi all,  
> > > > I have the following perhaps trivial question but I have been going at it for a little while with no avail. I want to configure a load check with different parameters for the web server and some image processing servers. For example, the load on the image processing servers is almost always going to be higher than the webserver, and I want to configure different thresholds. I also want to monitor a number of databases with different names, which in essense is the same problem with parameters as before.
> 
> > > > Any ideas on how I go around implementing this? A small detail is that I am using Chef to deploy sensu. Thanks for any suggestions!
> 
> > >
> 
> > > –  
> > > Bethany Erskine
> 
> > > DevOps Engineer
> 
> > > [http://www.paperlesspost.com](http://www.paperlesspost.com)
> 
> –  
> Bethany Erskine
> 
> DevOps Engineer
> 
> [http://www.paperlesspost.com](http://www.paperlesspost.com)

---

<div class="post-metadata">

**Author:** ![jspaleta](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/jspaleta/32/141_2.png) [@jspaleta](https://discourse.sensu.io/u/jspaleta)\
**Post date:** [November 22, 2018, 2:04am UTC](https://discourse.sensu.io/t/different-parameters-for-the-same-check-on-a-per-host-basis/66/6 "2018-11-22T02:04:58Z")

</div>


