2017年9月21日 星期四

cacti plugin thold + Line API Alert




 cacti 0.8.x  + setting plugin (0.71)

# vi /var/www/html/cacti/plugins/settings/include/functions.php

function send_mail($to, $from, $subject, $message, $filename = '', $headers = '') {
....
.....

       // Line API plugin here

        return '';

}

## thold (0.5)

# vi /var/www/html/cacti/plugins/thold/thold_functions.php


function thold_mail($to, $from, $subject, $message, $filename, $headers = '') {
....
.....

       // Line API plugin here

        return '';
}


======================================================

cacti 1.1.x

# vi /var/www/html/cacti/lib/functions.php


function send_mail($to, $from, $subject, $body, $attachments = '', $headers = '', $html = false) {
....
...

// Line API plugin here

        return mailer($from, $to, '', '', '', $subject, $body, '', $attachments, $headers, $html);
}


## thold (1.0.x)


# vi /var/www/html/cacti/plugins/thold/thold_functions.php



function thold_mail($to_email, $from_email, $subject, $message, $filename, $headers = '') {
.......
....

// Line API plugin here

        return '';
}


參考資訊

如何做出 cacti plugin manager + Line API Alert
http://xrcd2.blogspot.tw/2017/01/cacti-plugin-manager-line-api-alert.html

使用 Perl 建立 Line API 運用環境
http://xrcd2.blogspot.tw/2016/12/perl-line-api.html

Line API 使用小筆記
http://www.vlab.com.tw/index.php/forum/21/15572-line-api

本 LAB 參考資訊

CACTI Alert 增加 LineNotify
http://penguinbbs.blogspot.tw/2017/08/cacti-alert-linenotify.html



Demo






















Demo2