Make Thold can send sms(enjoy this)^_^...

Support questions about the Threshold plugin

Moderators: Developers, Moderators

Post Reply
tracky2007
Posts: 34
Joined: Thu Dec 27, 2007 3:07 am

Make Thold can send sms(enjoy this)^_^...

Post by tracky2007 »

First...sorry for my English...
This change based on Thold_Version0.49-3,PIA3.0,cacti0.87h and above...(on my cacti_host,not been test on other version)
features below:
1、sms support on thold list and templates;(my sms send by an oracle proc,so you need to install php-oci8 extensions,Simply you can thange to your method by modify thold_functions.php where the function call "thold_mms")
the user list selection is here:(you can use cacti's own user management)
02.JPG
02.JPG (12.99 KiB) Viewed 9212 times
2、Support Time Exempttion(thold list and templates,you can thoose when sms will not be send,this time control need class "My97DatePicker")
Time Exempttion
Time Exempttion
03.JPG (41.3 KiB) Viewed 9212 times
3、Support host down notification config by excel and sms send...(this need you include phpexcel classes)
host_down_sms
host_down_sms
04.JPG (37.11 KiB) Viewed 9212 times
If you like these change,you may need to do some modification below these:
1、alter tables(thold_data,thold_template) from mysql like this:
alter_table
alter_table
05.JPG (147.51 KiB) Viewed 9212 times
2、modify some php(thold.php,thold_functions.php,thold_templates.php,time control classes "My97DatePicker") like this zip:
modify_php_file_and_My97DatePicker.zip
update on 20111231 11:05
(94.09 KiB) Downloaded 547 times
(some bug found,so i'v update this file on 20111231 11:09)

Some attention:
For Simplified Chinese Support, I have to convert some $subject to GB2312,like this(in code):
"$subject = iconv("GB2312", "UTF-8//IGNORE", $subject)"
if you use EN,you may turn this code back......

I really like cacti, like thold!Thank you for all Developers... thewitness,rony......
Last, hope you like this small modification and Merry Christmas... :D :D :D
Last edited by tracky2007 on Fri Dec 30, 2011 10:12 pm, edited 3 times in total.
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: Make Thold can send sms(enjoy this)^_^...

Post by noname »

tracky2007 wrote: 1、sms support on thold list and templates;(my sms send by an oracle proc,so you need to install php-oci8 extensions,Simply you can thange to your method by modify thold_functions.php where the function call "thold_mms")

<snip>

Some attention:
For Simplified Chinese Support, I have to convert some $subject to GB2312,like this(in code):
"$subject = iconv("GB2312", "UTF-8//IGNORE", $subject)"
if you use EN,you may turn this code back......
As he said, some part in thold_functions.php needs to be customized -- especially Chinese messages, file paths (e.g. $filepath, $smserr_filename) and code for sending SMS in function thold_mms() (hardcoded his own configurations for testing) etc.

But I think, this is a nice add-on of thold plugin for particular use.

For reference, here is a difference from original thold plugin:
diff_thold_functions.html.zip
Differences report by WinMerge
(89.23 KiB) Downloaded 444 times
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Make Thold can send sms(enjoy this)^_^...

Post by TheWitness »

I'll let Cigamit validate this one. Don't know if that should go into the Notification lists or not.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Make Thold can send sms(enjoy this)^_^...

Post by cigamit »

I haven't taken a look just yet, but I will later tonight. Ideally I would port over my code from thold trunk that allows multiple different types of alerts (email, snmp write, script execution, etc...) and this would be added as one of the types of alerts (or a separate plugin that hooks into thold to add this type of alert).
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests