- Create whale-heartbeat script in /usr/local/bin with correct uuid.
- Set up collectd with network plugin pointed at whale.io
pillar/
whale.sls
salt/
whale.sls
files/scripts/whale-heartbeat
whale: | |
{% if '<hostname>' %} | |
uuid: <uuid-hostname> | |
{% endif %} | |
collectd: | |
FQDNLookup: true | |
TypesDB: ['/usr/share/collectd/types.db'] | |
plugins: | |
default: [cpu, entropy, load, memory, swap, load] | |
enable: false | |
syslog: | |
LogLevel: info | |
network: | |
host: 'whale.io' | |
port: 25826 |
#!/bin/sh | |
curl -H "Content-Type: application/json" -d '{"uuid": "{{ pillar['whale']['uuid'] }}"}' https://whale.io/api/clientlistener/keepalive > /dev/null 2>&1 |
include: | |
- collectd | |
- collectd.network | |
- collectd.syslog | |
/usr/local/bin/whale-heartbeat: | |
file.managed: | |
- source: salt://files/scripts/whale-heartbeat | |
- user: root | |
- group: root | |
- mode: 755 | |
- template: jinja | |
cron.present: | |
- user: root |