Sensuctl Asset usage!

Hi Team,

Can i download asset tar file locally and use it?
Because i downloaded asset tar file locally for sensu-plugins-cpu-checks & sensu-ruby-runtime_0.0.8_ruby.
I uploaded to them to my local repo and using related sha512. Its not working for me.

Its throwing, check-cpu — error getting assets for event:
sha512 ‘518e7c17cf670393045bff4af318e1d35955bfde166e9ceec2b469109252f79043ed133241c4dc96501b6636a1ec5e008ea9ce055d1609865635d4f004d7187b’ does not match specified
sha512: ‘df10f1d8bdf0ccbc6540cd89d643b7cee119ed0ccbed29e187600ee8b262dc3d66f24a518c29f98f5bde5cfe8d613efc8178df6e43d9d82f017a5239a003b0b2’

how can i fix it? Please help me.

Thanks
Viv.

1 Like

Yes, it is absolutely possible to host assets behind your firewall! I do this in my dev environment using a simple NGINX server running in Docker. In fact, this error suggests that your local repo is configured correctly, and the Sensu agent is able to download the asset, so you did everything right there.

This error is telling you that the SHA512 provided in your Asset definition doesn’t match the SHA512 of the file the agent fetched from the server.

Double check your Asset configuration. If you need to troubleshoot, try downloading the asset and checking the SHA yourself; on a linux system you should be able to run the following commands:

$ curl -LO http://<host>:<port>/<path>/<asset>.tar.gz 
$ shasum -a 512 <asset>.tar.gz

I hope this helps!

1 Like

Great! it works
Thanks @calebhailey

1 Like

Awesome. Glad I could help!