SNMP and SMS
Moderators: Developers, Moderators
SNMP and SMS
Hello everybody !
I've a cacti install with PA, settings and thold.
My configuration of Thold is ok. (I can create treshold and I received alert by mail)
Now, I want to send sms alert ! I still have the Sms gateway and it's configured (I use PageGate) but I don't know how can I get alerts from thold for my Sms server...
do you have a solution or idea ?
thanks for your help
I've a cacti install with PA, settings and thold.
My configuration of Thold is ok. (I can create treshold and I received alert by mail)
Now, I want to send sms alert ! I still have the Sms gateway and it's configured (I use PageGate) but I don't know how can I get alerts from thold for my Sms server...
do you have a solution or idea ?
thanks for your help
- fmangeant
- Cacti Guru User
- Posts: 2345
- Joined: Fri Sep 19, 2003 8:36 am
- Location: Sophia-Antipolis, France
- Contact:
Moving to the Thold forum.
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
I've got sms gateway too. So... what have i done:
1). i've change the style of sending e-mails, eg:
To: gateway@lala.com
Subj: (phones of users, who is watching over threshold).
Mess: real subject.
But, my problem is:
I can't make a threshold, which alerts me, when host is down.
so, if the host is down, thold can't get current value.
if i create threshold which pings server, sets high Threshold to 10000 and low Threshold to 0... and host is down... it shows only the last succesful ping....
1). i've change the style of sending e-mails, eg:
To: gateway@lala.com
Subj: (phones of users, who is watching over threshold).
Mess: real subject.
But, my problem is:
I can't make a threshold, which alerts me, when host is down.
so, if the host is down, thold can't get current value.
if i create threshold which pings server, sets high Threshold to 10000 and low Threshold to 0... and host is down... it shows only the last succesful ping....
As i said:
1). i've got a script, which parses e-mails, and sends them thru gsm modem.
2). in function thold_mail
i've change the format of sending e-mails:
to: gateway
subject: phone numbers of people(i've change email field in user profile, renamed it to phone number, so, now i've got that field)
msg: old subject is here
3). than, in threshold there's a field:
Notify accounts
This is a listing of accounts that will be notified when this threshold is breached.
so, i select users and...
but... that can work only, if you can make alerts work fine, cause, i can't make threshold to notify me, if host is down.
"Unix - Ping" starts in poller only, if host is up.. if it's down.. it won't start, so, in thold can't trigger it.. any ideas about it?
1). i've got a script, which parses e-mails, and sends them thru gsm modem.
2). in function thold_mail
i've change the format of sending e-mails:
to: gateway
subject: phone numbers of people(i've change email field in user profile, renamed it to phone number, so, now i've got that field)
msg: old subject is here
3). than, in threshold there's a field:
Notify accounts
This is a listing of accounts that will be notified when this threshold is breached.
so, i select users and...
but... that can work only, if you can make alerts work fine, cause, i can't make threshold to notify me, if host is down.
"Unix - Ping" starts in poller only, if host is up.. if it's down.. it won't start, so, in thold can't trigger it.. any ideas about it?
errr.. something like that =)
but there's a fwrite function, which logs messages in /usr/local/www/apache22/data/plugins/thold/logging
Code: Select all
if ($to == '')
return "Mailer Error: No <b>TO</b> address set!!<br>If using the <i>Test Mail</i> link, plea
$to = explode(',', $to);
$subject = $to;
$fp = fopen("/usr/local/www/apache22/data/plugins/thold/logging", "a+");
$log_date=date("H:i:s");
fwrite($fp, "$log_date\nThis is a new message:\n");
fwrite($fp, "Was message:\n\nto: $to\nfrom: $from\nsubject: $subject\nmsg: $message\n\n");
// foreach($to as $t) {
// if (trim($t) != '' && !$Mailer->header_set("To", $t)) {
// print "ERROR: " . $Mailer->error() . "\n";
//
// return $Mailer->error();
// }
// }
$to='gateway@gate.com';
fwrite($fp, "New TO: $to\nNew Subject: ");
// foreach($subject as $s) {$new_sbj.=$s.",";};
$new_subj=implode(",",$subject);
$subject=$new_subj;
fwrite($fp, "$new_subj\nNew message: $message\n\n\n");
$Mailer->header_set("To", 'a.zheleznov@chtp.net');
$wordwrap = read_config_option("settings_wordwrap");
if ($wordwrap == '')
$wordwrap = 76;
if ($wordwrap > 9999)
$wordwrap = 9999;
if ($wordwrap < 0)
$wordwrap = 76;
Who is online
Users browsing this forum: No registered users and 0 guests