Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Fri Mar 24, 2017 7:22 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Graph is not populated and mail reporting is not working
PostPosted: Mon Mar 20, 2017 2:42 am 
Offline

Joined: Wed Nov 23, 2016 2:42 am
Posts: 29
My technical supports :
Cacti 1.0.5
Spine 1.0.3
RRDTool 1.4.5 VC10
Net-SNMP 5.5.0-2
MySQL 5.7.16
PHP 7.0.16
IIS 8.5
Window Server 2012

RRDTool Command:
c:/rrdtool/rrdtool.exe graph - \
--imgformat=PNG \
--start="-180000" \
--end="-300" \
--pango-markup \
--title="Cacti Host Test - CPU Utilization" \
--vertical-label="percent" \
--slope-mode \
--base=1000 \
--height=150 \
--width=600 \
--alt-autoscale-max \
--lower-limit="0" \
--color BACK#F3F3F3 \
--color CANVAS#FDFDFD \
--color SHADEA#CBCBCB \
--color SHADEB#999999 \
--color FONT#000000 \
--color AXIS#2C4D43 \
--color ARROW#2C4D43 \
--color FRAME#2C4D43 \
--border 1 --font TITLE:11:"Ariel" \
--font AXIS:8:"Ariel" \
--font LEGEND:8:"Courier" \
--font UNIT:8:"Ariel" \
--font WATERMARK:6:"Ariel" \
--slope-mode \
--watermark "Copyright (C) 2004-2017 The Cacti Group" \
DEF:a="C\:/inetpub/wwwroot/cacti/rra/cacti_host_test_sscpusystem_47.rrd":"ssCpuSystem":AVERAGE \
DEF:b="C\:/inetpub/wwwroot/cacti/rra/cacti_host_test_sscpuuser_48.rrd":"ssCpuUser":AVERAGE \
DEF:c="C\:/inetpub/wwwroot/cacti/rra/cacti_host_test_sscpuidle_46.rrd":"ssCpuIdle":AVERAGE \
CDEF:cdefbc="100,TIME,1489994873,GT,a,a,UN,0,a,IF,IF,TIME,1489994873,GT,b,b,UN,0,b,IF,IF,TIME,1489994873,GT,c,c,UN,0,c,IF,IF,+,+,-" \
AREA:a#F51D307F:"System\: " \
GPRINT:a:LAST:"Current\:%8.1lf %%" \
GPRINT:a:AVERAGE:"Average\:%8.1lf %%" \
GPRINT:a:MAX:"Maximum\:%8.1lf %%\n" \
AREA:b#74C3667F:"User\: ":STACK \
GPRINT:b:LAST:"Current\:%8.1lf %%" \
GPRINT:b:AVERAGE:"Average\:%8.1lf %%" \
GPRINT:b:MAX:"Maximum\:%8.1lf %%\n" \
AREA:c#3D3C3A7F:"Idle\: ":STACK \
GPRINT:c:LAST:"Current\:%8.1lf %%" \
GPRINT:c:AVERAGE:"Average\:%8.1lf %%" \
GPRINT:c:MAX:"Maximum\:%8.1lf %%\n" \
AREA:cdefbc#00004D7F:"IO Wait\:":STACK \
GPRINT:cdefbc:LAST:"Current\:%8.1lf %%" \
GPRINT:cdefbc:AVERAGE:"Average\:%8.1lf %%" \
GPRINT:cdefbc:MAX:"Maximum\:%8.1lf %%\n"

RRDTool Says:
OK


--- Mail Reporting ---
Cacti Log :
- Test mail Error
2017-03-20 11:30:54 - CMDPHP PHP ERROR WARNING Backtrace: (C:\inetpub\wwwroot\cacti\settings.php: 100 email_test)(C:\inetpub\wwwroot\cacti\lib\functions.php: 3761 send_mail)(C:\inetpub\wwwroot\cacti\lib\functions.php: 3354 mailer)(C:\inetpub\wwwroot\cacti\lib\functions.php: 3638 send)(C:\inetpub\wwwroot\cacti\include\phpmailer\class.phpmailer.php: 1213 postSend)(C:\inetpub\wwwroot\cacti\include\phpmailer\class.phpmailer.php: 1337 mailSend)(C:\inetpub\wwwroot\cacti\include\phpmailer\class.phpmailer.php: 1500 mailPassthru)(C:\inetpub\wwwroot\cacti\include\phpmailer\class.phpmailer.php: 698 mail)(CactiErrorHandler)(C:\inetpub\wwwroot\cacti\lib\functions.php: 4260 cacti_debug_backtrace)
2017-03-20 11:30:54 - ERROR PHP WARNING: mail(): Failed to connect to mailserver at "localhost" port 587, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in file: C:\inetpub\wwwroot\cacti\include\phpmailer\class.phpmailer.php on line: 698

- test 'Send report now' button
2017-03-20 14:33:41 - MAILER Mail Failed to 'xxx@gmail.com', Subject: 'Cacti Report'

- snmp2_get() no response
2017-03-20 11:25:12 - CMDPHP WARNING: SNMP Error:'snmp2_get(): No response from x.x.x.x', Device:'x.x.x.x', OID:'.x.x.x.x.x.x.x.x.x.x'

No error in php_errors.txt.
Pollers active.
RRD Tool is working.
Graph is not populated for all graph templates.
SMTP Port = 587 (I tried to use SMTP too and got same result)


Attachments:
mail configuration on settings.jpg
mail configuration on settings.jpg [ 155.98 KiB | Viewed 105 times ]
Top
 Profile  
 
 Post subject: Re: Graph is not populated and mail reporting is not working
PostPosted: Tue Mar 21, 2017 9:07 am 
Offline

Joined: Fri Oct 05, 2012 12:22 am
Posts: 11
zetoo wrote:
--- Mail Reporting ---
Cacti Log :
- Test mail Error
2017-03-20 11:30:54 - CMDPHP PHP ERROR WARNING Backtrace: (C:\inetpub\wwwroot\cacti\settings.php: 100 email_test)(C:\inetpub\wwwroot\cacti\lib\functions.php: 3761 send_mail)(C:\inetpub\wwwroot\cacti\lib\functions.php: 3354 mailer)(C:\inetpub\wwwroot\cacti\lib\functions.php: 3638 send)(C:\inetpub\wwwroot\cacti\include\phpmailer\class.phpmailer.php: 1213 postSend)(C:\inetpub\wwwroot\cacti\include\phpmailer\class.phpmailer.php: 1337 mailSend)(C:\inetpub\wwwroot\cacti\include\phpmailer\class.phpmailer.php: 1500 mailPassthru)(C:\inetpub\wwwroot\cacti\include\phpmailer\class.phpmailer.php: 698 mail)(CactiErrorHandler)(C:\inetpub\wwwroot\cacti\lib\functions.php: 4260 cacti_debug_backtrace)
2017-03-20 11:30:54 - ERROR PHP WARNING: mail(): Failed to connect to mailserver at "localhost" port 587, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in file: C:\inetpub\wwwroot\cacti\include\phpmailer\class.phpmailer.php on line: 698


You Cacti-Installation is using the PHPMail-Function.
So you need to configure your system to connect to an SMTP-Server, otherwise it will try to send it out to localhost.
Normally on a Linux-Box you have exim4 or sendmail and you need to configure it.
If you want something more easier you can try "ssmtp" here is a little HowTo: https://thewireframecommunity.com/node/39
It's easy to configure and after I've done this my PHP-Mail worked and reports were sent out.

Cheers Christian

PS: Oh i just saw you are having a Windows-Server ... Hmm maybe try to use not the PHPMailer-Function, try to figure out the SMTP-Function instead.

_________________
Debian 8.7
Cacti 1.06


Top
 Profile  
 
 Post subject: Re: Graph is not populated and mail reporting is not working
PostPosted: Tue Mar 21, 2017 11:36 pm 
Offline

Joined: Wed Nov 23, 2016 2:42 am
Posts: 29
cmantzel wrote:
zetoo wrote:
--- Mail Reporting ---
Cacti Log :
- Test mail Error
2017-03-20 11:30:54 - CMDPHP PHP ERROR WARNING Backtrace: (C:\inetpub\wwwroot\cacti\settings.php: 100 email_test)(C:\inetpub\wwwroot\cacti\lib\functions.php: 3761 send_mail)(C:\inetpub\wwwroot\cacti\lib\functions.php: 3354 mailer)(C:\inetpub\wwwroot\cacti\lib\functions.php: 3638 send)(C:\inetpub\wwwroot\cacti\include\phpmailer\class.phpmailer.php: 1213 postSend)(C:\inetpub\wwwroot\cacti\include\phpmailer\class.phpmailer.php: 1337 mailSend)(C:\inetpub\wwwroot\cacti\include\phpmailer\class.phpmailer.php: 1500 mailPassthru)(C:\inetpub\wwwroot\cacti\include\phpmailer\class.phpmailer.php: 698 mail)(CactiErrorHandler)(C:\inetpub\wwwroot\cacti\lib\functions.php: 4260 cacti_debug_backtrace)
2017-03-20 11:30:54 - ERROR PHP WARNING: mail(): Failed to connect to mailserver at "localhost" port 587, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in file: C:\inetpub\wwwroot\cacti\include\phpmailer\class.phpmailer.php on line: 698


You Cacti-Installation is using the PHPMail-Function.
So you need to configure your system to connect to an SMTP-Server, otherwise it will try to send it out to localhost.
Normally on a Linux-Box you have exim4 or sendmail and you need to configure it.
If you want something more easier you can try "ssmtp" here is a little HowTo: https://thewireframecommunity.com/node/39
It's easy to configure and after I've done this my PHP-Mail worked and reports were sent out.

Cheers Christian

PS: Oh i just saw you are having a Windows-Server ... Hmm maybe try to use not the PHPMailer-Function, try to figure out the SMTP-Function instead.


Thanks for you suggestion ! I will try to figure it out for SMTP-function.

PS: Do you know which steps I need to configure for SMTP-function ?
*SMTP Server activated already


Last edited by zetoo on Wed Mar 22, 2017 2:23 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Graph is not populated and mail reporting is not working
PostPosted: Wed Mar 22, 2017 1:50 am 
Offline

Joined: Fri Oct 05, 2012 12:22 am
Posts: 11
If you choose "SMTP" instead of "PHPMailer" the SMTP-Options become available in the settings.
Just fill in with your SMTP-Server (Windows Exchange or Linux postfix)

Attachment:
cacti_smtp.png
cacti_smtp.png [ 14.53 KiB | Viewed 39 times ]


I am not very experienced with Windows-Servers I am Linux-guy :)

_________________
Debian 8.7
Cacti 1.06


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Rno and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group