mirror of
https://github.com/caronc/apprise.git
synced 2024-12-04 05:54:35 +01:00
Page:
Notify_rsyslog
Pages
CLI_Usage
DemoPlugin_Basic
DemoPlugin_WebRequest
Development_API
Development_Apprise_Details
Development_Contribution
Development_LogCapture
Home
Notification_Graveyard
Notify_Custom_Form
Notify_Custom_JSON
Notify_Custom_XML
Notify_Revolt
Notify_africas_talking
Notify_apprise_api
Notify_aprs
Notify_bark
Notify_boxcar
Notify_bulksms
Notify_bulkvs
Notify_burst_sms
Notify_chantify
Notify_clicksend
Notify_d7networks
Notify_dapnet
Notify_dbus
Notify_dingtalk
Notify_discord
Notify_email Fastmail
Notify_email
Notify_emby
Notify_enigma2
Notify_faast
Notify_fcm
Notify_feishu
Notify_flock
Notify_freemobile
Notify_gitter
Notify_gnome
Notify_googlechat
Notify_gotify
Notify_growl
Notify_guilded
Notify_homeassistant
Notify_httpsms
Notify_ifttt
Notify_join
Notify_kavenegar
Notify_kodi
Notify_kumulos
Notify_lametric
Notify_line
Notify_lunasea
Notify_macosx
Notify_mailgun
Notify_mastodon
Notify_matrix
Notify_mattermost
Notify_messagebird
Notify_misskey
Notify_mqtt
Notify_msg91
Notify_msteams
Notify_nexmo
Notify_nextcloud
Notify_nextcloudtalk
Notify_notica
Notify_notifiarr
Notify_notifico
Notify_ntfy
Notify_office365
Notify_onesignal
Notify_opsgenie
Notify_pagerduty
Notify_pagertree
Notify_parseplatform
Notify_plivo
Notify_popcornnotify
Notify_prowl
Notify_pushalot
Notify_pushbullet
Notify_pushdeer
Notify_pushed
Notify_pushjet
Notify_pushme
Notify_pushover
Notify_pushsafer
Notify_pushy
Notify_reddit
Notify_rocketchat
Notify_rsyslog
Notify_ryver
Notify_sendgrid
Notify_serverchan
Notify_ses
Notify_seven
Notify_sfr
Notify_signal
Notify_simplepush
Notify_sinch
Notify_slack
Notify_sms_manager
Notify_smseagle
Notify_smtp2go
Notify_sns
Notify_sparkpost
Notify_splunk
Notify_spontit
Notify_streamlabs
Notify_stride
Notify_synology_chat
Notify_syslog
Notify_techulus
Notify_telegram
Notify_threema
Notify_toasty
Notify_twilio
Notify_twist
Notify_twitter
Notify_voipms
Notify_wecombot
Notify_whatsapp
Notify_windows
Notify_workflows
Notify_wxpusher
Notify_wxteams
Notify_xbmc
Notify_xmpp
Notify_zulip
Sponsors
Troubleshooting
URLBasics
config
config_text
config_yaml
decorator_notify
persistent_storage
showcase
Table of Contents
This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Remote Syslog Notifications
- Source: https://tools.ietf.org/html/rfc5424
- Icon Support: No
- Message Format: Text
- Message Limit: 32768 Characters per message
Remote Syslog is a way for network devices to send event messages to a logging server – usually known as a Syslog server. The Syslog protocol is supported by a wide range of devices and can be used to log different types of events.
Syntax
Valid syntax is as follows:
syslog://{host}
syslog://{host}:{port}
syslog://{host}/{facility}
syslog://{host}:{port}/{facility}
One might change the facility on a remote syslog (rsyslog) server from it's default like so:
syslog://localhost/local5
Parameter Breakdown
Variable | Required | Description |
---|---|---|
host | No | Query a remote Syslog server (rsyslog) by optionally specifying the hostname |
port | No | The remote port associated with your rsyslog server provided. By default if this value isn't sent port 514 is used by default. |
facility | No | The facility to use, by default it is user . Valid options are kern, user, mail, daemon, auth, syslog, lpr, news, uucp, cron, local0, local1, local2, local3, local4, local5, local6, and local7 |
logpid | Yes | Include PID as part of the log output. |
Example
Send a Remote Syslog notification
# The following sends a syslog notification to the `user` facility
apprise -vv -t "Test Message Title" -b "Test Message Body" \
rsyslog://localhost
Internal RSyslog Test Server
# Setup a simple docker file that will run our our rsyslog server for us:
cat << _EOF > dockerfile.syslog
FROM ubuntu
RUN apt update && apt install rsyslog -y
RUN echo '\$ModLoad imudp\n \\
\$UDPServerRun 514\n \\
\$ModLoad imtcp\n \\
\$InputTCPServerRun 514\n \\
\$template RemoteStore, "/var/log/remote/%\$year%-%\$Month%-%\$Day%.log"\n \\
:source, !isequal, "localhost" -?RemoteStore\n \\
:source, isequal, "last" ~ ' > /etc/rsyslog.conf
ENTRYPOINT ["rsyslogd", "-n"]
_EOF
# build it:
docker build -t mysyslog -f dockerfile.syslog .
# Now run it:
docker run --cap-add SYSLOG --restart always \
-v $(pwd)/log:/var/log \
-p 514:514 -p 514:514/udp --name rsyslog mysyslog
# In another terminal window, you can look into a directory
# relative to the location you ran the above command for a directory
# called `log`
You may need to adjust it's permissions, the log file will only get
created after you send an apprise notification.