[SOLVED] Graph is not populated from Graph Templates

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Moderators, Developers

Post Reply
Author
Message
zetoo
Cacti User
Posts: 68
Joined: Wed Nov 23, 2016 2:42 am

[SOLVED] Graph is not populated from Graph Templates

#1 Post by zetoo » Mon Mar 20, 2017 2:42 am

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


- snmp2_get() no response (SOLVED by disabling snmp module in php.ini)
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.

*Solved by using another template.
Last edited by zetoo on Mon Jul 03, 2017 2:39 am, edited 3 times in total.

cmantzel
Posts: 15
Joined: Fri Oct 05, 2012 12:22 am

Re: Graph is not populated and mail reporting is not working

#2 Post by cmantzel » Tue Mar 21, 2017 9:07 am

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

zetoo
Cacti User
Posts: 68
Joined: Wed Nov 23, 2016 2:42 am

Re: Graph is not populated and mail reporting is not working

#3 Post by zetoo » Tue Mar 21, 2017 11:36 pm

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.

cmantzel
Posts: 15
Joined: Fri Oct 05, 2012 12:22 am

Re: Graph is not populated and mail reporting is not working

#4 Post by cmantzel » Wed Mar 22, 2017 1:50 am

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)
cacti_smtp.png
cacti_smtp.png (14.53 KiB) Viewed 1328 times
I am not very experienced with Windows-Servers I am Linux-guy :)
Debian 8.7
Cacti 1.06

zetoo
Cacti User
Posts: 68
Joined: Wed Nov 23, 2016 2:42 am

Re: Graph is not populated and mail reporting is not working

#5 Post by zetoo » Thu Mar 30, 2017 3:10 am

Graph still not populated after upgrade to 1.1.1 and re-populate cache. Seems like this issue will takes more time since I dont know what to do.

zetoo
Cacti User
Posts: 68
Joined: Wed Nov 23, 2016 2:42 am

Re: Graph is not populated and mail reporting is not working

#6 Post by zetoo » Mon Apr 17, 2017 10:01 pm

Cigamit said :
"On approximately line 2051, you will see something like:

$output = rrdtool_execute("$graph ...

issue the following statement just before that call:

cacti_log("$graph ...);

Take the log output and then attempt to run this from the command line. Let us know what the output/error is."

Could someone help me to locate those line?
Since i did not found it within my cacti and rrdtool folder at all.

I am using windows server 2012.

zetoo
Cacti User
Posts: 68
Joined: Wed Nov 23, 2016 2:42 am

Re: Graph is not populated from Graph Templates

#7 Post by zetoo » Tue Apr 25, 2017 11:07 pm

Anyone know what kind of configuration I need to do for graph template to generate graph?

zetoo
Cacti User
Posts: 68
Joined: Wed Nov 23, 2016 2:42 am

Re: Graph is not populated from Graph Templates

#8 Post by zetoo » Fri May 05, 2017 5:01 am

Seems like I can only use graph template called Host MIB - Logged in Users and Host MIB - Processes. Other graph templates is not generating graph at all.

I can also generate graph from Used Space template which generated from data query through disk space.

Please advise me :cry:

User avatar
Osiris
Cacti Pro User
Posts: 841
Joined: Mon Jan 05, 2015 10:10 am

Re: Graph is not populated from Graph Templates

#9 Post by Osiris » Sat May 06, 2017 9:22 am

Wat rrdtool version?
Before history, there was a paradise, now dust.

zetoo
Cacti User
Posts: 68
Joined: Wed Nov 23, 2016 2:42 am

Re: Graph is not populated from Graph Templates

#10 Post by zetoo » Sun May 07, 2017 9:33 pm

Osiris wrote:Wat rrdtool version?
- Cacti 1.1.4
- Spine 1.1.4
- IIS 8.5
- Windows 10
-MySQL 5.7.16
-PHP 7.0.18
-Net-SNMP 5.7.0
-RRDTool 1.4.5 VC10 with Cygwin to 2.8

I am using installer from BSOD2600 :)
Is it related to RRDTool or Spine ? I think I missed the configuration for both of them.

Post Reply