Setup
To use Goral you need to have a Google account and obtain a service account:
- Create a project (we suggest creating a separate project for Goral for security reasons)
- Enable Sheets from the products page
- Create a service account with
Editor
role - Create a private key (type JSON) for it (the private key should be downloaded by your browser)
- Create a spreadsheet (where the scraped data will be stored) and add the service account email as an
Editor
to the spreadsheet - Extract spreadsheet id from the spreadsheet url
Steps 5-6 can be repeated for each service (it is recommended to have separate spreadsheets for usability and separation of concerns).
Note: you can also install Google Sheets app for your phone to have an access to the data.
Notifications are sent to messengers with three levels:
- 🟢 (INFO)
- 🟡 (WARN)
- 🔴 (ERROR)
and are prefixed with id (the argument for --id
flag). Messengers are configured separately for every service so that you can use e.g. Discord for General service and Telegram for Healthcheck.
Discord
Webhook creation
- Create a text channel
- In the settings of the channel (cogwheel) go to the Integrations -> Webhooks
- Either use the default one or create a new webhook
Example configuration:
messenger.url = "https://discord.com/api/webhooks/<webhook_id>/<webhook_token>"
Slack
App creation
Follow the quickstart guide and the posting guide.
Example configuration:
messenger.specific.token = "xoxb-slack-token"
messenger.specific.channel = "CHRISHWFH2"
messenger.url = "https://slack.com/api/chat.postMessage"
Telegram
Bot creation
- Create a bot
- Create a private group for notifications to be sent to
- Add your bot to the group
- Obtain a
chat_id
following the accepted answer
Example configuration:
messenger.specific.chat_id = "-100129008371"
messenger.url = "https://api.telegram.org/bot<bot token>/sendMessage"
Note: for Telegram all info-level messages are sent without notification so the phone doesn't vibrate or make any sound.