# External Check command token substitution?

**URL:** <https://discourse.sensu.io/t/external-check-command-token-substitution/490>\
**Category:** Sensu Classic (EOL)\
**Created:** [September 21, 2015, 4:07pm UTC](https://discourse.sensu.io/t/external-check-command-token-substitution/490 "2015-09-21T16:07:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adam\_Stracener](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@Adam\_Stracener](https://discourse.sensu.io/u/Adam_Stracener)\
**Post date:** [September 21, 2015, 4:07pm UTC](https://discourse.sensu.io/t/external-check-command-token-substitution/490/1 "2015-09-21T16:07:31Z")

</div>

We are using Ansible and working on full automation on new client setup and one of the steps is creating new checks, metrics and monitoring using Sensu.  
I know I can add data into the client.json but Ansible isn’t amazing with adding in JSON data, so I would like to know if there is a way to pull cred information from an external source?

We are using Hashicorp’s Vault as a method to store database information, Ansible does a great job pulling that information from the API. But would like to know if there is a way to get Sensu to do the same?

---

<div class="post-metadata">

**Author:** ![Kyle\_Anderson](https://avatars.discourse-cdn.com/v4/letter/k/e5b9ba/32.png) [@Kyle\_Anderson](https://discourse.sensu.io/u/Kyle_Anderson)\
**Post date:** [September 25, 2015, 2:25am UTC](https://discourse.sensu.io/t/external-check-command-token-substitution/490/2 "2015-09-25T02:25:27Z")

</div>

Sensu is probably not the best layer to interact with vault at "check  
definition" time.  
Have you considered using consul-template to write down secrets in  
plain old config files, that way any tool can use them? (sensu or  
otherwise)

> **···**
>
> On Mon, Sep 21, 2015 at 9:07 AM, Adam Stracener \<adamstracener@gmail.com\> wrote:
> 
> > We are using Ansible and working on full automation on new client setup and  
> > one of the steps is creating new checks, metrics and monitoring using Sensu.  
> > I know I can add data into the client.json but Ansible isn't amazing with  
> > adding in JSON data, so I would like to know if there is a way to pull cred  
> > information from an external source?  
> > We are using Hashicorp's Vault as a method to store database information,  
> > Ansible does a great job pulling that information from the API. But would  
> > like to know if there is a way to get Sensu to do the same?
