Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Command = &commandLine{¬ifications.Notification{ Method: "command", Title: "Command", Description: "Shell Command allows you to run a customized shell/bash Command on the local machine it's running on.", Author: "Hunter Long", AuthorUrl: "https://github.com/hunterlong", Delay: time.Duration(1 * time.Second), Icon: "fas fa-terminal", Host: "/bin/bash", Limits: 60, Form: []notifications.NotificationForm{{ Type: "text", Title: "Executable Path", Placeholder: "/usr/bin/curl", DbField: "host", SmallText: "You can use '/bin/sh', '/bin/bash', '/usr/bin/curl' or an absolute path for an application.", }, { Type: "text", Title: "Command to Run on OnSuccess", Placeholder: "http://localhost:8080/health", DbField: "var1", SmallText: "<b>Accepts Variables</b> This Command will run when a service is receiving a Successful event.", }, { Type: "text", Title: "Command to Run on OnFailure", Placeholder: "http://localhost:8080/health", DbField: "var2", SmallText: "<b>Accepts Variables</b> This Command will run when a service is receiving a Failing event.", }}}, }
View Source
var Discorder = &discord{¬ifications.Notification{ Method: "discord", Title: "discord", Description: "Send notifications to your discord channel using discord webhooks. Insert your discord channel Webhook URL to receive notifications. Based on the <a href=\"https://discordapp.com/developers/docs/resources/Webhook\">discord webhooker API</a>.", Author: "Hunter Long", AuthorUrl: "https://github.com/hunterlong", Delay: time.Duration(5 * time.Second), Host: "https://discordapp.com/api/webhooks/****/*****", Icon: "fab fa-discord", Limits: 60, Form: []notifications.NotificationForm{{ Type: "text", Title: "discord webhooker URL", Placeholder: "Insert your Webhook URL here", DbField: "host", }}}, }
View Source
var LineNotify = &lineNotifier{¬ifications.Notification{ Method: lineNotifyMethod, Title: "LINE Notify", Description: "LINE Notify will send notifications to your LINE Notify account when services are offline or online. Based on the <a href=\"https://notify-bot.line.me/doc/en/\">LINE Notify API</a>.", Author: "Kanin Peanviriyakulkit", AuthorUrl: "https://github.com/dogrocker", Icon: "far fa-bell", Limits: 60, Form: []notifications.NotificationForm{{ Type: "text", Title: "Access Token", Placeholder: "Insert your Line Notify Access Token here.", DbField: "api_secret", }}}, }
View Source
var Mobile = &mobilePush{¬ifications.Notification{ Method: "mobile", Title: "Mobile", Description: `Receive push notifications on your Mobile device using the Statping App. You can scan the Authentication QR Code found in Settings to get the Mobile app setup in seconds. <p align="center"><a href="https://play.google.com/store/apps/details?id=com.statping"><img src="https://img.cjx.io/google-play.svg"></a><a href="https://itunes.apple.com/us/app/apple-store/id1445513219"><img src="https://img.cjx.io/app-store-badge.svg"></a></p>`, Author: "Hunter Long", AuthorUrl: "https://github.com/hunterlong", Delay: time.Duration(5 * time.Second), Icon: "fas fa-mobile-alt", Limits: 30, Form: []notifications.NotificationForm{{ Type: "text", Title: "Device Identifiers", Placeholder: "A list of your Mobile device push notification ID's.", DbField: "var1", IsHidden: true, }, { Type: "number", Title: "Array of device numbers", Placeholder: "1 for iphone 2 for android", DbField: "var2", IsHidden: true, }}}, }
View Source
var Pushover = &pushover{¬ifications.Notification{ Method: "pushover", Title: "Pushover", Description: "Use Pushover to receive push notifications. You will need to create a <a href=\"https://pushover.net/apps/build\">New Application</a> on Pushover before using this notifier.", Author: "Hunter Long", AuthorUrl: "https://github.com/hunterlong", Icon: "fa dot-circle", Delay: time.Duration(10 * time.Second), Limits: 60, Form: []notifications.NotificationForm{{ Type: "text", Title: "User Token", Placeholder: "Insert your device's Pushover Token", DbField: "api_key", Required: true, }, { Type: "text", Title: "Application API Key", Placeholder: "Create an Application and insert the API Key here", DbField: "api_secret", Required: true, }, }}, }
View Source
var Telegram = &telegram{¬ifications.Notification{ Method: "telegram", Title: "Telegram", Description: "Receive notifications on your Telegram channel when a service has an issue. You must get a Telegram API token from the /botfather. Review the <a target=\"_blank\" href=\"http://techthoughts.info/how-to-create-a-telegram-bot-and-send-messages-via-api\">Telegram API Tutorial</a> to learn how to generate a new API Token.", Author: "Hunter Long", AuthorUrl: "https://github.com/hunterlong", Icon: "fab fa-telegram-plane", Delay: time.Duration(5 * time.Second), Limits: 60, Form: []notifications.NotificationForm{{ Type: "text", Title: "Telegram API Token", Placeholder: "383810182:EEx829dtCeufeQYXG7CUdiQopqdmmxBPO7-s", SmallText: "Enter the API Token given to you from the /botfather chat.", DbField: "api_secret", Required: true, }, { Type: "text", Title: "Channel or User", Placeholder: "@statping_channel", SmallText: "Insert your Telegram Channel or User here.", DbField: "var1", Required: true, }}}, }
View Source
var Twilio = &twilio{¬ifications.Notification{ Method: "twilio", Title: "Twilio", Description: "Receive SMS text messages directly to your cellphone when a service is offline. You can use a Twilio test account with limits. This notifier uses the <a href=\"https://www.twilio.com/docs/usage/api\">Twilio API</a>.", Author: "Hunter Long", AuthorUrl: "https://github.com/hunterlong", Icon: "far fa-comment-alt", Delay: time.Duration(10 * time.Second), Limits: 15, Form: []notifications.NotificationForm{{ Type: "text", Title: "Account SID", Placeholder: "Insert your Twilio Account SID", DbField: "api_key", Required: true, }, { Type: "text", Title: "Account Token", Placeholder: "Insert your Twilio Account Token", DbField: "api_secret", Required: true, }, { Type: "text", Title: "SMS to Phone Number", Placeholder: "18555555555", DbField: "Var1", Required: true, }, { Type: "text", Title: "From Phone Number", Placeholder: "18555555555", DbField: "Var2", Required: true, }}}, }
View Source
var Webhook = &webhooker{¬ifications.Notification{ Method: webhookMethod, Title: "Webhook", Description: "Send a custom HTTP request to a specific URL with your own body, headers, and parameters.", Author: "Hunter Long", AuthorUrl: "https://github.com/hunterlong", Icon: "fas fa-code-branch", Delay: time.Duration(1 * time.Second), Limits: 180, Form: []notifications.NotificationForm{{ Type: "text", Title: "HTTP Endpoint", Placeholder: "http://webhookurl.com/JW2MCP4SKQP", SmallText: "Insert the URL for your HTTP Requests.", DbField: "Host", Required: true, }, { Type: "text", Title: "HTTP Method", Placeholder: "POST", SmallText: "Choose a HTTP method for example: GET, POST, DELETE, or PATCH.", DbField: "Var1", Required: true, }, { Type: "textarea", Title: "HTTP Body", Placeholder: `{"service_id": {{.Service.Id}}", "service_name": "{{.Service.Name}"}`, SmallText: "Optional HTTP body for a POST request. You can insert variables into your body request.<br>{{.Service.Id}}, {{.Service.Name}}, {{.Service.Online}}<br>{{.Failure.Issue}}", DbField: "Var2", }, { Type: "text", Title: "Content Type", Placeholder: `application/json`, SmallText: "Optional content type for example: application/json or text/plain", DbField: "api_key", }, { Type: "text", Title: "Header", Placeholder: "Authorization=Token12345", SmallText: "Optional Headers for request use format: KEY=Value,Key=Value", DbField: "api_secret", }, }}}
Functions ¶
func Add ¶ added in v0.90.11
func Add(notifs ...services.ServiceNotifier)
func InitNotifiers ¶ added in v0.90.11
func InitNotifiers()
func ReplaceTemplate ¶ added in v0.90.36
Types ¶
type PushNotification ¶ added in v0.80.2
type PushNotification struct {
Array []*pushArray `json:"notifications"`
}
Click to show internal directories.
Click to hide internal directories.