View in #sensu-go on Slack
@george.bolo: hey all. is there any examples on how to configure checks? In the ruby sensu, the agent can be made to read from a directory of checks defined in json
is this still the case?
@palourde: @george.bolo Sensu Go is now API driven, so it doesn’t load checks and other resources from the disk. You can either manually create checks with the check command (sensuctl check create
) or define your checks in a configuration file and install them with sensuctl create
, see https://docs.sensu.io/sensu-go/5.1/sensuctl/reference/#creating-resources.
Sensu Docs: Sensuctl | Sensu Go 5.1
@george.bolo: @palourde thank you
@aaronsachs: @george.bolo are there any particular checks you’re wanting an example of?
@george.bolo: @aaronsachs well basically I used to use the sensu ruby checks, but i really want to avoid using ruby at all
so i might use some checks written in go or c or some other compiled language. I will allow bash as well
@aaronsachs: Gotcha
@george.bolo: im seeing this asset thing
is this a way to push check binaries?
@aaronsachs if you got some examples on using assets + checks that would be awesome
@aaronsachs: We did just publish a guide that walks through those
Kind of more oriented toward new to Sensu folks
Lemme snag the link
@george.bolo: btw, im super happy you guys rewrote sensu in go
@aaronsachs:
@george.bolo: i was a big fan of the old one too
@aaronsachs: https://docs.sensu.io/sensu-go/5.1/getting-started/sample-app/ is the link to the guide
Sensu Docs: Container and application monitoring with Sensu | Sensu Go 5.1
@george.bolo: but this new one is even more devops oriented
@aaronsachs: the tl;dr is that you deploy a sample app on k8s
@george.bolo: plus no ruby required
@aaronsachs: but
Oh yeah
No ruby is making things much easier
as is the lack of rabbit/redis
@george.bolo: yea
@aaronsachs: But yeah, so the guide makes use of assets and checks
@george.bolo: ok ill look it over, thanks buddy
@aaronsachs: Gives an idea of one possible workflow you could adopt
sure thing!
@george.bolo: hey @aaronsachs so usually I would push various dependencies with with ansible (for example my binary check). I have looked at this new featuire called assets, which seems really cool. However, it requires a URL. Is there a way to push my asset directly to the backend server (without URL) and have the sensu-agents download it directly from the backend?
@aaronsachs: @george.bolo good question, and offhand, I’m not sure as I’m not well versed in Ansible. @jaredl might be a better resource for you.
@jaredl: Hmmm, good question. I haven’t personally touched the asset configuration a ton. If I understand https://docs.sensu.io/sensu-go/5.1/reference/assets/ correctly though, you’d want to have the asset tarball hosted somewhere accessible over http(s). You might be able to skip that by dropping the asset directly into the cache directory (https://docs.sensu.io/sensu-go/5.1/reference/assets/#default-cache-directory) but, I’ve never tried that.
Sensu Docs: Assets | Sensu Go 5.1
Sensu Docs: Assets | Sensu Go 5.1
@portertech: @george.bolo you could have ansible install nginx on the backend and serve the assets from there!
keeping everything within the network* and under ansible control
@george.bolo: @portertech I feel this is a missed opportunity. Since all agents connect to backend, it would be ideal to also store assets on it (optionally)
@portertech: @george.bolo we decided early on to not incorporate a blob/file store in the backend. most users who I spoke to already had some form of application release artifact/asset hosting in place, it made sense to leverage that and not reinvent it
I definitely see the value in having it part of sensu or at least at its side
it could be that the sensu backend eventually provides this capability, time will tell!