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)
2、Support Time Exempttion(thold list and templates,you can thoose when sms will not be send,this time control need class "My97DatePicker")
3、Support host down notification config by excel and sms send...(this need you include phpexcel classes)
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:
2、modify some php(thold.php,thold_functions.php,thold_templates.php,time control classes "My97DatePicker") like this zip:
(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...
Make Thold can send sms(enjoy this)^_^...
Moderators: Developers, Moderators
-
- Posts: 34
- Joined: Thu Dec 27, 2007 3:07 am
Make Thold can send sms(enjoy this)^_^...
Last edited by tracky2007 on Fri Dec 30, 2011 10:12 pm, edited 3 times in total.
Re: Make Thold can send sms(enjoy this)^_^...
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.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......
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:
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: Make Thold can send sms(enjoy this)^_^...
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?
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?
Re: Make Thold can send sms(enjoy this)^_^...
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).
Who is online
Users browsing this forum: No registered users and 4 guests