sudo visudo
### Allow sensu group to control nginx service without requiring a password
%sensu ALL=NOPASSWD:/usr/bin/systemctl stop nginx.service
%sensu ALL=NOPASSWD:/usr/bin/systemctl stop nginx
| Very simple staticly defined sensu proxy check using ping command. | |
| source attribute value be used in the check result to replace the client name. | |
| replace <<HOST>> with hostname want | |
| { | |
| "checks": { | |
| "ping-<<HOST>>": { | |
| "command": "ping <<HOST>>", | |
| "subscribers": [ | |
| "ping-proxy" |
| server { | |
| listen 8080 default_server; | |
| listen [::]:8080 default_server; | |
| server_name _; | |
| root /usr/share/nginx/html; | |
| # enable ssl encryption | |
| ssl on; | |
| ssl_certificate /etc/ssl/certs/nginx-proxy-selfsigned.crt; |
sudo visudo
### Allow sensu group to control nginx service without requiring a password
%sensu ALL=NOPASSWD:/usr/bin/systemctl stop nginx.service
%sensu ALL=NOPASSWD:/usr/bin/systemctl stop nginx
docker run -v /tmp/sensu:/var/lib/sensu -d --name sensu-backend -p 2380:2380 -p 3000:3000 -p 8080:8080 -p 8081:8081 sensu/sensu:latest sensu-backend start
Note 1: this will mount your hosts /tmp/sensu directory into the container's /var/lib/sensu. Replace the host directory as needed for your environment. I use /tmp/sensu here to make it easy to clean up and get back to an unconfigured state.
Note 2: The sensu-backend service exposes all necessary ports to the local host so that you can interact with it as if it were running as a local service instead of a container.
| --- | |
| type: Namespace | |
| api_version: core/v2 | |
| metadata: {} | |
| spec: | |
| name: <<namespace>> | |
| --- | |
| type: Role | |
| api_version: core/v2 | |
| metadata: |
| --- | |
| type: Asset | |
| api_version: core/v2 | |
| metadata: | |
| name: jspaleta/monitoring-plugins | |
| namespace: default | |
| spec: | |
| # Existing attributes -> added as build entry for backwards compatibility | |
| sha512: asdasdas | |
| url: http/what.up/asset.tar.gz |
| Build asset tarball place in staging directory | |
| include test script in staging directory | |
| include additional asset tarballs for test into staging directory | |
| run test script on target os container mount staging directory | |
| Test script functionality: | |
| unpack asset tarball(s) | |
| set PATH and LD_LIBRARY_PATH to mimick asset environment | |
| run test check | |
| look for errors |
| #!/bin/sh | |
| # | |
| # check_status_as_metric.sh | |
| # optionally set measurement, field | |
| # Ex: | |
| # check_status_as_metric.sh measurement="${entity_name}" field="${check_name}.status" | |
| # | |
| event=$(cat /dev/stdin) |
| # Extend the sensu-agent service init to call the update_name.sh script | |
| # place this file in: /etc/systemd/system/sensu-agent.service.d | |
| # With systemd you don't have to edit the vendor provided service init script. | |
| # local admins can extend/override vendor settings by using correctly named extension directory structures | |
| # Ex: /etc/systemd/system/sensu-agent.service.d/ | |
| # This .d directory will be parsed for systemd directives to extend/override the vendor supplied sensu-agent.service | |
| # For now all we want to do is add an ExecStartPre directive, |
| { | |
| "__inputs": [ | |
| { | |
| "name": "DS_INFLUXDB", | |
| "label": "InfluxDB", | |
| "description": "", | |
| "type": "datasource", | |
| "pluginId": "influxdb", | |
| "pluginName": "InfluxDB" | |
| } |