Nectar Plugin

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Ok, bad luck.
I'm sorry for all this inconvenience. In fact, my own testing was not deep enough. Bad news: I'm currently focusing on 088, so this plugin has minor priority. But I will come back. Hope you stay tuned ...
R
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Gandalf - no issues.

In actual fact, as I need this probably more than you do, I'm happy to pick up the development and testing if this works for you ?
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

mcutting wrote:Gandalf - no issues.

In actual fact, as I need this probably more than you do, I'm happy to pick up the development and testing if this works for you ?
I'm fine with this. Please provide changes as tar.gz diff files and I will try to integrate them without much delay. You may post via EMail if you want; please don't use PM
R
blmcmb
Posts: 8
Joined: Thu Dec 17, 2009 10:05 am

Pb Attachment

Post by blmcmb »

The problem seems to be that the image is not an attachment to the mail but an attachment to the HTML attachment.

The message headers look like this:

X-Mailer: Cacti-Mailer-Class
User-Agent: Cacti-Mailer-Class
Subject: report A
Content-Type: multipart/alternative; type="text/html";
boundary="--_MAILER_25945_1262783994_4413270"

The first attachment is Content-Type: text/plain
It contains only the name of the report.

The second attachment is Content-Type: multipart/related;
boundary="--_MAILER_25945_1262783994_4413270_HTML"

(note the _HTML).

This second attachment contains two attachments delimited by the _HTML tag. The first is a HTML text for the name of the report, and the second is the requested PNG file.

The MUA Zimbra chooses to show only the HTML text, "forgetting" there is a PNG. It is possible to obtain the PNG by asking Zimbra to reply to or to forward the mail with all the attachments; the PNG is then accessible while composing the new mail.

The text-mode MUA Mutt shows only the text, with no attachments (which is justified since the HTML part is "alternative". As with Zimbra, it is possible to obtain the image if you know it is there, by using Mutt's detailed view of the message construction:

Code: Select all

  I     1 <no description>               [multipa/alternativ, 7bit, 59K]
  I     2 ├─><no description>          [text/plain, x-unkn, utf-8, 0.1K]
  I     3 └─><no description>               [multipa/related, 7bit, 59K]
  I     4   ├─><no description>         [text/html, x-unkn, utf-8, 0.1K]
  I     5   └─>32.png                           [image/png, base64, 59K]
The PNG should be attached directly to the mail, and not at a level once removed.
hesterik
Posts: 2
Joined: Wed Jan 06, 2010 4:34 pm

Nectar don't send mail

Post by hesterik »

I have configured the Nectar plugin, but when try to send an e-mail, I get the folling errormessage in the Cacti Logfile.

NECTAR: Poller[0] Sending EMail was suppressed due to not running on the active CACTI system.

Questions about the the error message:
- Sending mail of the Threshold plugin works ok.

The configuration of E-mail settings works ok with PHP Mail Function of SMTP with other notifications.

Can someone give me more information about the message.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Oops, that's bad. This is a result of a specific patch of mine. I'll have to update the code.
R
blmcmb
Posts: 8
Joined: Thu Dec 17, 2009 10:05 am

Probleme Sending Email

Post by blmcmb »

Modify the file "nectar_functions.php" with your IP.

Code: Select all

function mg_send_mail($to, $from, $subject, $message, $data_array = '', $headers = '') {
        global $config;
        include_once($config["base_path"] . "/plugins/settings/include/mailer.php");

        /* avoid sending mails from hot standby system */
        $result = array();
        $cactiip = "xx.xx.xx.xx";
        $cmd = "/sbin/ifconfig |grep 'xx.xx.xx.xx'";
        $res = exec($cmd, $result);
        if (!$res) {
                cacti_log("Sending EMail was suppressed due to not running on the active CACTI system", true, "NECTAR");
                return;
        }
......
.....
Last edited by blmcmb on Thu Jan 07, 2010 7:15 am, edited 1 time in total.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Correct catch. We're running two systems in parallel but only need one Email. You may simple delete that stuff. Perhaps I'll go and make this into a configurable setting
R
User avatar
farmorg
Posts: 4
Joined: Thu Jan 07, 2010 8:52 am
Location: UK

Post by farmorg »

Hi all

I have installed this plugin to enable us to send usage reports to customers and have noticed that the Report Interval always seems to send graphs for 1 day only.
I have tried setting it to 5 days, 1 week, 1 month Base:Day, 1 month Base:Weekday and 1 year.

Is anyone else seeing this behaviour?

Regards
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please post a screenshot of your settings for one specific Report with "*Show Next Events." switched on.
R
User avatar
farmorg
Posts: 4
Joined: Thu Jan 07, 2010 8:52 am
Location: UK

Post by farmorg »

Hi gandalf, thanks for your response.

Please find attached the requested screenshot and also a shot of one of the graphs received by email.

I realize that the 1st scheduled date is in the future but I have the same problem using the Send Now option and when I receive a scheduled report.

These graphs have been in place for a few months now so there is more than enough data for the required time period.

Thanks and regards
Attachments
nectar1.jpg
nectar1.jpg (302.2 KiB) Viewed 3735 times
nectar2.jpg
nectar2.jpg (60.29 KiB) Viewed 3735 times
User avatar
farmorg
Posts: 4
Joined: Thu Jan 07, 2010 8:52 am
Location: UK

Post by farmorg »

gandalf

I just realised my silly mistake with missing the timespan option, it seems to be working perfectly.
Applogies for wasting your time and thanks again for taking the time to reply.

Thanks for the great plugin.

Perhaps it would be appropriate to remove my posts to respect other peoples time and resources.

Best regards
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

farmorg wrote:Perhaps it would be appropriate to remove my posts to respect other peoples time and resources.
Think positive: This may _help_ others! You're not the only one who makes mistakes, me and others too!
R
blmcmb
Posts: 8
Joined: Thu Dec 17, 2009 10:05 am

Pb Attachement

Post by blmcmb »

Hi gandalf
How can I correct the problem of the attachement (not working with zimbra)?. cf my message of January 6.

Thanks
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Pb Attachement

Post by gandalf »

blmcmb wrote:Hi gandalf
How can I correct the problem of the attachement (not working with zimbra)?. cf my message of January 6.

Thanks
I don't have a solution, yet. I'll have to dig deeper into our won PHP Mail class to fix that problem. But I'm working on new 088 features ATM. Contributions are welcome
R
Locked

Who is online

Users browsing this forum: No registered users and 3 guests