-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration
After installation, the default configuration file is placed at /etc/goshawk.yml, owned by root and with permissions 0600 to prevent users from modifying it or reading API keys.
The default network port is 47495/tcp. If you are using firewalld, you can use this command to open it: sudo firewall-cmd --add-port=47495/tcp --permanent && sudo firewall-cmd --reload
After starting the service, you can check the logs of the systemd service with: sudo journalctl -fu goshawk.
To modify the command line of the systemd unit, run the command sudo systemctl edit goshawk. In the editor, type the following configuration:
[Service]
ExecStart=
ExecStart=/usr/bin/goshawk -config /etc/goshawk.yml -v -hash yourconfigfilehash
The file example_config.yaml file contains an explanation about every parameter to be configured.
If you configure the notification URL to an empty string, goshawk will log every alert to standard output.
In this section you can find alternatives to get your notifications.
This system is free and very simple.
- Open a conversation with @botfather in Telegram, select the command
/newbotand chose your bot name. - Talk to your new bot and, just after that, navigate to
https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdatesto copy your chat id. - Configure the
notification_urlin goshawk tohttps://api.telegram.org/bot<YOUR_BOT_TOKEN>/sendMessage - Configure your
template_bodyto"{ \"chat_id\": 120963222, \"text\": \"{{ .ServiceName }} is {{ if .IsActive }}active{{ else }}inactive{{ end }}\" }"
You can monitor the /health endpoint after installing this Wordpress plugin: https://wordpress.org/plugins/health-endpoint/