Skip to content

Usage Guide

theAkito edited this page Feb 15, 2022 · 4 revisions

The app is configured through the provided configuration JSON file. If none is found during startup, the following default one will be auto-generated. So, if you need your initial config, just start the app once and the config becomes available.

Default procwatch.json
{
  "version": "0.1.0",
  "intervalPoll": 5000,
  "useMail": false,
  "useDesktop": false,
  "useMattermost": false,
  "useMatrix": false,
  "useRocketChat": false,
  "useGotify": true,
  "useRevoltChat": false,
  "useMumble": false,
  "mail": {
    "nameSender": "",
    "username": "",
    "password": "",
    "subject": "",
    "message": "Process Finished",
    "portOutgoing": 587,
    "smtpServerOutgoing": "",
    "addressSource": "",
    "addressTarget": []
  },
  "dbus": {
    "nameApp": "Process Watcher",
    "summary": "Process Finished",
    "message": "Watched process finished executing.",
    "nameIcon": "help-faq",
    "timeout": 15000
  },
  "mattermost": {
    "url": "https://mattermost.com",
    "loginID": "",
    "password": "",
    "token": "",
    "channelID": "",
    "message": "Process Finished",
    "rootID": "",
    "fileIDs": [],
    "properties": {}
  },
  "matrix": {
    "url": "https://matrix.org",
    "username": "",
    "password": "",
    "roomID": "",
    "message": "Process Finished"
  },
  "rocketchat": {
    "url": "https://example.rocket.chat",
    "token": "",
    "userID": "",
    "roomID": "",
    "channel": "",
    "toUser": "",
    "message": "Process Finished"
  },
  "gotify": {
    "url": "localhost:5000",
    "token": "AXgI3C5Moz75xsd",
    "title": "Process Finished",
    "message": "Watched process finished executing.",
    "priority": 0,
    "extras": {}
  },
  "debug": true
}

Explanation of each confguration option:

intervalPoll: How often watched process is being checked. 5000 milliseconds is the default, which means the file system is checked every 5 seconds.

useMail: If true, mail has to be configured and will be used to send notifications.

useDesktop: If true, D-Bus has to be configured and will be used to send notifications, mainly useful for Linux desktop notifications.

useMattermost: If true, Mattermost has to be configured and will be used to send notifications, mainly useful for Linux desktop notifications.

useMatrix: If true, Matrix has to be configured and will be used to send notifications, mainly useful for Linux desktop notifications.

useRocketChat: If true, Rocket.Chat has to be configured and will be used to send notifications, mainly useful for Linux desktop notifications.

useRevoltChat: NOT IMPLEMENTED

useMumble: NOT IMPLEMENTED

mailNameSender: The sender name that should show up, when an e-mail is sent.

mailUsername: The actual login to authenticate with the sending e-mail server. Is most likely the e-mail address which the mails are sent from.

mailPassword: The login password to authenticate with the sending e-mail server.

mailSubject: E-Mail subject.

mailMessage: E-Mail content.

mailPortOutgoing: SMTP server's outgoing port.

mailSmtpServerOutgoing: SMTP server's outgoing SMTP server address.

mailAddressSource: The e-mail address which the e-mail is sent from.

mailAddressTarget: An array of strings, where each string is a target e-mail address, the e-mails should be sent to. Naturally, it's possible to provide a single address in the array, if only one e-mail address should be addressed.

dbusNameApp: When a desktop notification is sent, it is attaching the name of the app sending the notification. With this option, you are free to choose your own app name.

dbusSummary: Basically, the "subject" line of a desktop notification.

dbusMessage: The content of a desktop notification.

dbusNameIcon: Name of the icon presented in the notification. Make sure an icon with that name actually exists!

dbusTimeout: How many milliseconds the notification will remain shown. Default is 15000, which means it shows 15 seconds.

mattermostURL: The Mattermost URL. Just provide the URL you use to access your Mattermost server. Should be HTTPS.

mattermostLoginID: Mattermost Login ID.

mattermostPassword: Mattermost Login password.

mattermostToken: Mattermost API Token. Recommended and preferred over username & password.

mattermostChannelID: Mattermost Channel ID where the message should be sent to. This ID has to be looked up in the channel's info page.

mattermostMessage: The message content.

mattermostRootID: ID of the parent message.

mattermostFileIDs: File IDs of already existing files on the server, to attach to the message.

mattermostProperties: JSON object of additional message properties.

matrixURL: URL of the Matrix instance. If you joined the official server, that's https://matrix.org.

matrixUsername: Matrix Login username.

matrixPassword: Matrix Login password.

matrixRoomID: The Matrix room's ID. Needs to be looked up on the room's info page.

matrixMessage: The message content that should be sent on process completion.

rocketChatURL: URL to access your Rocket.Chat instance.

rocketChatUserID: The Rocket.Chat generated user ID. This is not the username used for your every-day login.

rocketChatToken: The Rocket.Chat generated user API token. This is not the password used for your every-day login.

rocketChatRoomID: The Room ID the messages should be sent to. Can only be discovered by using the Rocket.Chat API. Is not used if either channel name or username is set.

rocketChatChannel: Channel name, where the messages should be sent to. Is not used if username is set.

rocketChatUserTarget: The username which should receive a private chat message about the watched process having finished. If this is set, channel name and Room ID will be ignored.

rocketChatMessage: The message content.

gotify.token: Application Token. NOT Client Token!

Clone this wiki locally