# Jef Practice: Preparing to use assets

**URL:** <https://discourse.sensu.io/t/jef-practice-preparing-to-use-assets/1325>\
**Category:** Sensu Go\
**Created:** [August 28, 2019, 1:43am UTC](https://discourse.sensu.io/t/jef-practice-preparing-to-use-assets/1325 "2019-08-28T01:43:14Z")\
**Posts on this page:** 1\
**Page:** 1

<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:** [August 28, 2019, 1:43am UTC](https://discourse.sensu.io/t/jef-practice-preparing-to-use-assets/1325/1 "2019-08-28T01:43:14Z")

</div>

Here’s a couple of things I do to make sure when setting up my agents for the first time. I generally follow this pattern any time I’m installing on an agent on a new linux distribution variant or container image that I haven’t interacted with before. So I thought I’d share.

**Double check your asset filters**  
Make sure the asset definition has a build definition with filters that match the entity you are trying to use the asset on. Sensu Go 5.12 introduces a new multi-build capable asset resource, so if you are using the multi-build style asset you may have multiple build each with its own filter list. For Sensu Go 5.11 and older, you just see a single filter list.

**Write a diagnostic check to report back PATH and LD\_LIBRARY\_PATH**  
When prototyping a new check that uses assets, i usually write it initially so that I am just echoing out the PATH and LD\_LIBRARY\_PATH variables as check output. Since the asset directory encodes the sha512sum for the specific asset binary being used, I can use this information to validate that the asset binary i expected to match via the filtering rules is the one used on the agent.

If the `which` command is available I’ll also include the output of the which `<target-command>` to verify the command i want to run is in the executable path. Containers might not have this command installed, so not always possible to use this as a diagnostic.

I’ll actually keep a couple of simple diagnostic checks un an unpublished state and edit them with sensuctl if i need to test new assets that I want to include. That way I can make sure the assets load on the system before I need to use them in a check… isolating the asset configuration testing separate from the operational check.

**Ruby Runtime**  
When using the ruby runtime asset, I’ll typically write a simple diagnostic check with a ruby command using the ruby interpreter directly to ensure basic ruby operation. Something of the form `ruby -e "puts 'hello world'"` or similar. o make sure basic ruby operation is working before layering additional ruby plugin assets on top.
