Skip to content

chinookng/cachet-url-monitor

Repository files navigation

cachet-url-monitor

Basic Setup

config.json

baseUrl: Specifies the base url of your cachet server.

token: Specifies your cachet token. Can be found in your cachet profile settings page on admin dashboard.

timezone: Specifies your default timezone. Must be same as set on cachet.

components: an array of objects. The objects been the components been monitored with properties as listed below.

componentId: Specifies the id of the component to be monitored.

componentUrl: Specifies the url of the component to be monitored(Always include the trailing backslash).

componentName: Must be same as on the Cachet Status page.

checkInterval: Specifies the time in milliseconds after which another check will occur.

payload: This must be specified only for a post requestType.

cachetCredentials.js

headers: You can set headers for your connection here. The major ones have already been set.

Daemon Script

sudo nano /etc/systemd/system/status-url-monitor.service

[Unit]
Description=Status URL Monitor
After=syslog.target
After=network.target
After=mysqld.service
#After=postgresql.service
#After=memcached.service
#After=redis.service

[Service]
Type=simple
User=root
Group=root
WorkingDirectory=/home
ExecStart=/home/youverify/.nvm/versions/node/v10.5.0/bin/node /home/youverify/www/cachet-url-monitor/index.js
Restart=always
Environment=USER=root HOME=/home

[Install]
WantedBy=multi-user.target

sudo systemctl start status-url-monitor

sudo systemctl enable status-url-monitor

sudo systemctl restart status-url-monitor

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published