Sensu Go Docker

  1. Sensu Go Docker 2
  2. Sensu Go Docker Download

Go forth and automate! Let's recap what we've covered so far: we've automated the Sensu backend and agent deployment using the Ansible Content Collection, and we've created some monitoring code (e.g. Check-http.yaml) to monitor a service and automate remediation with Ansible Automation Platform. Install Sensu Go. Deploy our official Docker container to get up and running in seconds. Docker.exe network create sensu docker.exe volume create sensu-backend.

Sensu Go Docker

This past week, I had the pleaseure of attending Dockercon. While I was there primarily working the Sensu booth, it occurred to me that Docker presents an ideal way to demo what Sensu does, and I can quickly get an environment up without having to go through the rigmarole that I previously did using Vagrant. Now, that’s not saying that I think one tool is better than the other, but for the purposes of quick demos, Docker is more useful to me.

Sensu Go DockerSensu Go Docker

So let’s go over the setup.

Docker details

I’m primarily using Docker for Mac right now, since I’ve switched over from my Linux laptop. But now that I’ve covered that, let’s take a look at this little repo I’m using.

And a look at the docker-compose file:

Sensu Go Docker 2

What we end up with here is a backend, an agent, and a local asset server (SUPER useful if you’re on 💩 wifi/internet). This means that I can quickly spin up an agent and a backend, and then drop any asset that I need to use in the assets directory and have the agent download it quickly.

This makes demos super quick to spin up, and I can scale a bunch of agents if I want to show a large number of agent containers connecting to the backend.



Our test suite relies heavily on custom docker images for testing. The mainreason that we use custom images is test speed: having prepared docker imagesvs. building them on each test execution saves a ton of time.

Adding a new image is relatively straightforward process. We can just copy oneof the preexisting definitions from the docker directory and update it. Alldocker files should have a name in the format of <name>-<tag>.docker.

To build and publish our image, we can run the docker/ script:

Sensu Go Docker Download

Note that the command will add a sensu-go-tests- prefix to all images. Inthe previous example, the build script will build image.