# Check shows up under "Checks", but not in subscription

**URL:** https://discourse.sensu.io/t/check-shows-up-under-checks-but-not-in-subscription/817
**Category:** Sensu Classic (EOL)
**Created:** [May 25, 2017, 12:45am UTC](https://discourse.sensu.io/t/check-shows-up-under-checks-but-not-in-subscription/817 "2017-05-25T00:45:43Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Alanpassel7](https://avatars.discourse-cdn.com/v4/letter/a/848f3c/32.png) [@Alanpassel7](https://discourse.sensu.io/u/Alanpassel7)
#### Post date: [May 25, 2017, 12:45am UTC](https://discourse.sensu.io/t/check-shows-up-under-checks-but-not-in-subscription/817/1 "2017-05-25T00:45:43Z")

</div>

I’m having a problem with getting a check to actually run.

The check in question is showing up under the Checks tab in Uchiwa, but when I click on one of the nodes that are in the subscription group that this check is in, it either doesn’t show up at all, or it shows up as having run once, and only once. To my eye (and a couple other eyes), it is set up exactly the same as the other checks, although it does have an “api\_requested” field showing up, that isn’t in any part of the configuration, so I’m unsure of what to make of that. This is from Uchiwa when I click on the check in question:

api\_requested

```auto
  { "creator": null , "reason": null
}

```

command

/etc/sensu/plugins/check-yarn.sh skynet

duration

0.012

executed

2017-05-25 09:18:28

handlers

opsgenie

issued

2017-05-25 09:17:25

name

yarn\_skynet

occurrences

1

output

yarn is OK, it has 3 pendingapps

status

0

type

standard

history

0

The output shown is correct. I think it’s odd that no interval is showing up - one is defined in the checks.yml on the master:

“yarn\_skynet”: {

“command”: “/etc/sensu/plugins/check-yarn.sh skynet”,

“handlers”: [

“opsgenie”

],

“interval”: 30,

“occurrences”: 1,

“subscribers”: [

“mapr\_alarms”

]

},

When I grep through the client logs, I see the following:

root@sensu-client:/var/log/sensu# grep yarn\_skynet sensu-client.log

{“timestamp”:“2017-05-25T09:18:28.849956+1000”,“level”:“info”,“message”:“received check request”,“check”:{“command”:"/etc/sensu/plugins/check-yarn.sh skynet",“handlers”:[“opsgenie”],“occurrences”:1,“name”:“yarn\_skynet”,“api\_requested”:{“reason”:null,“creator”:null},“issued”:1495667845}}

{“timestamp”:“2017-05-25T09:18:28.862034+1000”,“level”:“info”,“message”:“publishing check result”,“payload”:{“client”:“sensu-client”,“check”:{“command”:"/etc/sensu/plugins/check-yarn.sh skynet",“handlers”:[“opsgenie”],“occurrences”:1,“name”:“yarn\_skynet”,“api\_requested”:{“reason”:null,“creator”:null},“issued”:1495667845,“executed”:1495667908,“duration”:0.012,“output”:“yarn is OK, it has 3 pendingapps\n”,“status”:0}}}

All other checks are reporting correctly, and no others have that “api\_requested” field.

Any thoughts or suggestions?

Thank you,

Alan

---

<div class="post-metadata">

### Author: ![cwjohnston](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/cwjohnston/32/193_2.png) [@cwjohnston](https://discourse.sensu.io/u/cwjohnston)
#### Post date: [May 25, 2017, 7:45pm UTC](https://discourse.sensu.io/t/check-shows-up-under-checks-but-not-in-subscription/817/2 "2017-05-25T19:45:21Z")

</div>

Hi Alan,

It would be most instructive to see the check configuration as rendered in JSON on the Sensu server. Based on the YAML you've provided here it looks like your check might be defining a list of "subscribers" instead of "subscriptions" as described in Sensu's check definition specification[0].

Regards,  
Cameron

[0]: [https://sensuapp.org/docs/latest/reference/checks.html#check-definition-specification](https://sensuapp.org/docs/latest/reference/checks.html#check-definition-specification)

---

<div class="post-metadata">

### Author: ![Alanpassel7](https://avatars.discourse-cdn.com/v4/letter/a/848f3c/32.png) [@Alanpassel7](https://discourse.sensu.io/u/Alanpassel7)
#### Post date: [May 25, 2017, 11:55pm UTC](https://discourse.sensu.io/t/check-shows-up-under-checks-but-not-in-subscription/817/3 "2017-05-25T23:55:10Z")

</div>

Hi Cameron,

Thank you for your response. I misspoke in my original post - that should have said checks.json, not checks.yml. Although it is pretty clearly json, not YAML.

But looking through the link you’ve provided, there is no “subscriptions” attribute - if anything, that link confirms that I’ve configured it correctly.

`subscribers`  
description  
An array of Sensu client subscriptions that check requests will be sent to. The array cannot be empty and its items must each be a string.  
required  
true (unless `standalone` is `true`)  
type  
Array  
example

```auto
"subscribers": ["production"]

```

> **···**
>
> On Friday, May 26, 2017 at 5:45:21 AM UTC+10, Cameron Johnston wrote:
> 
> > Hi Alan,  
> > It would be most instructive to see the check configuration as rendered in JSON on the Sensu server. Based on the YAML you’ve provided here it looks like your check might be defining a list of “subscribers” instead of “subscriptions” as described in Sensu’s check definition specification0.
> 
> > Regards,  
> > Cameron
> 
> >

---

<div class="post-metadata">

### Author: ![Alanpassel7](https://avatars.discourse-cdn.com/v4/letter/a/848f3c/32.png) [@Alanpassel7](https://discourse.sensu.io/u/Alanpassel7)
#### Post date: [May 26, 2017, 1:29am UTC](https://discourse.sensu.io/t/check-shows-up-under-checks-but-not-in-subscription/817/4 "2017-05-26T01:29:07Z")

</div>

Ok, this issue is resolved, although I still have no idea what the problem was. Basically, I nuked the sensu master and then re-ran the playbook to install it, and it came back working properly.

The only thing I can think of is maybe Redis or RabbitMQ had the check in some weird state, that needed to be purged, but I’m not sure even what to look for, there, and needed Sensu reporting properly right away, so I went with the purge, rather than looking any deeper into the stack.

> **···**
>
> On Friday, May 26, 2017 at 9:55:10 AM UTC+10, [alanp...@gmail.com](mailto:alanp...@gmail.com) wrote:
> 
> > Hi Cameron,
> 
> > Thank you for your response. I misspoke in my original post - that should have said checks.json, not checks.yml. Although it is pretty clearly json, not YAML.
> 
> > 
> 
> > But looking through the link you’ve provided, there is no “subscriptions” attribute - if anything, that link confirms that I’ve configured it correctly.
> 
> > 
> 
> > `subscribers`  
> > description  
> > An array of Sensu client subscriptions that check requests will be sent to. The array cannot be empty and its items must each be a string.  
> > required  
> > true (unless `standalone` is `true`)  
> > type  
> > Array  
> > example
> > 
> > ```auto
> > "subscribers": ["production"]
> > 
> > ```
> > 
> > On Friday, May 26, 2017 at 5:45:21 AM UTC+10, Cameron Johnston wrote:
> > 
> > > Hi Alan,  
> > > It would be most instructive to see the check configuration as rendered in JSON on the Sensu server. Based on the YAML you’ve provided here it looks like your check might be defining a list of “subscribers” instead of “subscriptions” as described in Sensu’s check definition specification0.
> 
> > > Regards,  
> > > Cameron
> 
> > >

---

<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:07am UTC](https://discourse.sensu.io/t/check-shows-up-under-checks-but-not-in-subscription/817/5 "2018-11-22T02:07:55Z")

</div>


