Problem with scheduling emails in Nectar

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
Rapsody09
Posts: 1
Joined: Mon Dec 17, 2012 3:27 am

Problem with scheduling emails in Nectar

Post by Rapsody09 »

Hello,

I had a problem with the plugin Nectar, I could send emails with the manual link but the sheduled report didn't work, I couldn' receive the sheduled mails. Seems like the Nectar poller was not launching.

So I had a little look in the code of the poller and I don't understand something (I am running Cacti 0.8.7g on a Debian). In /usr/share/cacti/site/poller.php before the call to "poller_bottom" :

Code: Select all

if ($poller_runs_completed <= $poller_runs) {
                        db_close();
                        api_plugin_hook('poller_bottom');
There is a call to db_close just before the call to function api_plugin_hook and when I look in the function api_plugin_hook in /usr/share/cacti/site/lib/plugins.php I see a request in the Database to look for what to call as poller_bottom :

Code: Select all

 /* order the plugin functions by system first, then followed by order */
        $result = db_fetch_assoc("SELECT 1 AS id, ph.name, ph.file, ph.function
                FROM plugin_hooks AS ph
                LEFT JOIN plugin_config AS pc
                ON pc.directory=ph.name
                WHERE ph.status = 1 AND hook = '$name'
                AND ph.name IN $ps_where
                UNION
                SELECT pc.id, ph.name, ph.file, ph.function
                FROM plugin_hooks AS ph
                LEFT JOIN plugin_config AS pc
                ON pc.directory=ph.name
                WHERE ph.status = 1 AND hook = '$name'
                AND ph.name NOT IN $ps_where
                ORDER BY id ASC", true);
So this request was not working and returning nothing and so the poller of nectar was not launching.

I just moved the Db_close after the call to poller_bottom in /usr/share/cacti/site/poller.php and now it's working better :

Code: Select all

if ($poller_runs_completed <= $poller_runs) {
                        api_plugin_hook('poller_bottom');
                        db_close();
Is there any reason why the Db_close was placed before poller_bottom ? Because in previous versions of Cacti I looked and it was placed after ?

Thank you
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest