首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >zabbix的工作sms脚本

zabbix的工作sms脚本
EN

Stack Overflow用户
提问于 2014-11-23 00:03:20
回答 2查看 2.6K关注 0票数 1

谁能提供一个从zabbix发送短信的工作脚本。我想使用免费的服务提供商。我找不到任何对此有用的脚本。

EN

回答 2

Stack Overflow用户

发布于 2015-11-10 16:01:26

您可以使用此脚本

代码语言:javascript
复制
#!/usr/bin/perl

print "content-type: text/html\n\n";
use CGI;
$cgi = new CGI;

$cel = $ARGV[0];
$title = $ARGV[1];
$msgx = $ARGV[2];

&enviasms;

# SOAP (Simple Object Access Protocol)
############################################

sub enviasms{ 

$dispatch = "send";
$account = "myaccount";
$code = "mypassword";
$msg = "$msgx";
$from = "Zabbix";
$to = "$cel";
$id = time();
$user = $id - 1;
$schedule = "";
$callbackOption = "";


use LWP::Simple;
#$result = get("http://system.human.com.br:8080/GatewayIntegration/msgSms.do?dispatch=send&account=$account&code=$cod e&msg=$msg&from=$from&to=$to&id=$id&schedule=$sche dule&callbackOption=$callbackOption");

if(!$result){
use strict;
use warnings;
open (my $fs, '>>', 'log');
print $fs "that is Error\n";
close $fs;
} else{
use strict;
use warnings;
open(my $fs, '>>','log');
print $fs "msg is: ";
print $fs $ARGV[2];
print $fs "::::>phone:";
print $fs $ARGV[0];
print $fs "\n";
close $fs;}}
票数 1
EN

Stack Overflow用户

发布于 2014-11-24 06:05:12

你可以查看Pagerduty,它不是免费的,但并不昂贵,它与安卓和iPhone应用程序带来了巨大的价值,它与Zabbix有很好的集成。

请查看此指南:http://www.pagerduty.com/docs/guides/zabbix-integration-guide-2/

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27079399

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档