Skip to content

Commit

Permalink
Update zabbix-pushsafer-more-parameter.py
Browse files Browse the repository at this point in the history
  • Loading branch information
appzer authored Mar 11, 2023
1 parent 2f6bfbe commit 22e47e0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion zabbix-pushsafer-more-parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ def rlb(thing):
parser.add_argument('priority', metavar=('priority'), type=str, help='-2 = lowest priority, -1 = lower priority, 0 = normal priority, 1 = high priority, 2 = highest priority')
parser.add_argument('retry', metavar=('retry'), type=str, help='number 60-10800 (60s steps), Time in seconds, after a message shuld resend.')
parser.add_argument('expire', metavar=('expire'), type=str, help='number 60-10800, Time in seconds, after the retry/resend should stop.')
parser.add_argument('confirm', metavar=('confirm'), type=str, help='number 10-10800, Time in seconds a message resend unitl it confirmed.')
parser.add_argument('answer', metavar=('answer'), type=str, help='1 = Answer is possible, 0 = Answer is not possible.')
parser.add_argument('answeroptions', metavar=('answeroptions'), type=str, help='predefined answer options divided by a pipe character e.g. Yes|No|Maybe')
parser.add_argument('answerforce', metavar=('answerforce'), type=str, help='1 = Force Answer')

# Argument processing
args = parser.parse_args()
Expand All @@ -105,11 +108,14 @@ def rlb(thing):
priority = args.priority
retry = args.retry
expire = args.expire
confirm = args.confirm
answer = args.answer
answeroptions = args.answeroptions
answerforce = args.answerforce

# Try to send the notification
init(privatekey)
Client("").send_message(message, subject, device, icon, sound, vibration, url, urltitle, time2live, priority, retry, expire, answer, "", "", "")
Client("").send_message(message, subject, device, icon, sound, vibration, url, urltitle, time2live, priority, retry, expire, confirm, answer, answeroptions, answerforce, "", "", "")

# Exit with success
l("Success: Message sent with Private Key [%s]: " % (privatekey))
Expand Down

0 comments on commit 22e47e0

Please sign in to comment.