Script Server Version of teMySQL stats and Host Template

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Edit the template and remove that field from it. It must be numeric and that setting was broken in prior versions of Cacti. By simply removing that value from the template, the Graph will be fixed.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
CdG
Posts: 17
Joined: Tue Jun 20, 2006 9:04 am

Post by CdG »

Could someone please upload the new script and host template to this forum? The links in the first post appears to be down.

CdG
CdG
Posts: 17
Joined: Tue Jun 20, 2006 9:04 am

Up again

Post by CdG »

Just checked. The site was up-and-running again, so I'm uploading the files myself.

CdG
Attachments
ss_mysql_stats.zip
(3.85 KiB) Downloaded 710 times
cacti_host_template_temysql_host.zip
(32.79 KiB) Downloaded 753 times
User avatar
mahuani
Cacti User
Posts: 72
Joined: Tue Nov 01, 2005 2:10 pm
Location: Lafayette, LA
Contact:

Post by mahuani »

Thanks, I've been meaning to upload them to the forums and not have the links rely on my server being up. I had a hdd crash and it took me a while to get it back up and running.
User avatar
RCK
Cacti User
Posts: 54
Joined: Fri Jan 26, 2007 12:38 pm

Could not import cacti_host_template_temysql_host.xml

Post by RCK »

First, I would like to thank you all for this server side conversion (especially TheWitness :))
It's amazing how this community is active!

Here is my problem: I could not import the cacti_host_template_temysql_host.xml file and I don't understand why.
The only things I get is a blank screen after the cacti import script timeout.
Then, I have the following error message each time I try to click again on "Import Templates" during the same session.
<see attached screenshot>
(Notice: Undefined index: dep in...)
(Fatal error: Only variables can be passed by reference in...)

If you have any idea, I'm interested ;)
RCK.

Informations about my configuration:

- Operating system is Debian sarge (stable)
- Mysql version is 5.0.32
- Net-SNMP version is 5.1.2
- RRDtool version is 1.2.11
- PHP version is 5.2.0
-- php_value upload_max_filesize 20M
-- php_value post_max_size 20M
-- php_value memory_limit 32M
-- php_value max_execution_time 300

- Cacti install is the 0.8.6j release (manual install)
- I am running cactid version 0.8.6i with no problem
- I have the 3 official patches applied
-- ping_php_version4_snmpgetnext.patch
-- tree_console_missing_hosts.patch
-- thumbnail_graphs_not_working.patch)

- I have installed the following templates and scripts with no problem:
-- HP procurve 2600 series - http://forums.cacti.net/viewtopic.php?t=19060
-- CPU usage on 2, 4 and 8 way Linux devices - http://forums.cacti.net/viewtopic.php?t=15412
-- ApacheStats 0.64 (PHP Script Server Version) - http://forums.cacti.net/viewtopic.php?t=17995

number of new records into the database (after bugged import):

cdef: 2
cdef_items: 6

data_input: 18
data_input_data: 75
data_input_fields: 149

data_template: 22
data_template_data: 20
data_template_data_rra: 88
data_template_rrd: 98

graph_templates: 8
graph_templates_graph: 8
graph_templates_item: 48
graph_template_input: 40
graph_template_input_defs: 46
Attachments
Fatal error: Only variables can be passed by reference
Fatal error: Only variables can be passed by reference
import_bug.gif (3.48 KiB) Viewed 10162 times
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Something is definately messed up. This should not happen. Unfortunately, I am out of town and my development environment is there and not where I am.

Can you build a separate Cacti site (no polling required), just a database name and a functional web site and then try to import it into that site? Use the J build with patches.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
RCK
Cacti User
Posts: 54
Joined: Fri Jan 26, 2007 12:38 pm

Post by RCK »

Yes, this was the next step in my mind, I will do that this evening.

- setup a fresh new cacti 0.8.6j on the same box
- apply patches
- try to import this Template and pray :)
User avatar
RCK
Cacti User
Posts: 54
Joined: Fri Jan 26, 2007 12:38 pm

Bug founded !

Post by RCK »

There was a bug in the old PHP release (4.2.0-3 dotdeb for debian stable).
The new PHP 4.2.1 is importing the template with no problem !
I'm happy this bug was not caused by cacti, even if it was hard to catch (xml parser fault IMO).
Last edited by RCK on Fri Jan 11, 2008 6:02 am, edited 1 time in total.
Cacti: 0.8.7g | Spine: 0.8.7g
Plugins: RRDclean - Weathermap - Thold - Realtime
My Template: ApacheStats 0.8.2 (multiple RRD, Low disk usage, Script Server)
MaffooClock
Posts: 17
Joined: Wed Jul 12, 2006 11:25 pm

Re: Could not import cacti_host_template_temysql_host.xml

Post by MaffooClock »

RCK wrote: Here is my problem: I could not import the cacti_host_template_temysql_host.xml file and I don't understand why.
The only things I get is a blank screen after the cacti import script timeout.
Then, I have the following error message each time I try to click again on "Import Templates" during the same session.
<see attached screenshot>
(Notice: Undefined index: dep in...)
(Fatal error: Only variables can be passed by reference in...)
I had this happen before with other imports, and I found the way to fix it is to remove all of the temporary sessions files created by PHP:
`rm /tmp/sess_*`
This will allow you to view the Import page again so you can try to re-import.
User avatar
evert
Posts: 27
Joined: Sun Sep 21, 2003 6:39 am
Location: Sarpsborg, Norway
Contact:

WARNING: Result from SERVER not valid. Partial Result

Post by evert »

Hi all!

I'm having the same problem, with partial result-errors. The script runs fine from cli, but not from Cacti. Judging by the output all is parsed ok though...

Code: Select all

06/12/2007 02:10:09 PM - CMDPHP: Poller[0] Host[8] DS[85] WARNING: Result from SERVER not valid.  Partial Result: 
06/12/2007 02:10:09 PM - CMDPHP: Poller[0] Host[8] DS[85] SERVER: /usr/bin/php -q  /var/www/localhost/htdocs/cacti/scripts/ss_mysql_stats.php tevolatilequery localhost cactiuser password, output: U

When I run

Code: Select all

/usr/bin/php -q  /var/www/localhost/htdocs/cacti/scripts/ss_mysql_stats.php tevolatilequery localhost cactiuser password
from the cli, I get the correct reply:

Code: Select all

Com_delete:65401 Com_insert:48707 Com_insert_select:10 Com_truncate:2537 Com_update:15975 Com_update_multi:0

How can this be?
Regards,
Evert Meulie
amsys
Posts: 4
Joined: Mon Sep 17, 2007 10:04 am

Re: WARNING: Result from SERVER not valid. Partial Result

Post by amsys »

evert wrote:How can this be?
maybe you have apache2 binded to real interface address and MySQL running on localhost, so get fqdn from /etc/hosts for that real address and then GRANT privileges for cactiuser from this address.
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Files seem no longer available...

Does anyone have a copy ?

Thanks in advance !
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

What files Frederic?

Larry
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Hi Larry

files on the 1st post, which were available here : http://mahuani.net/cacti/, but it dos not seem to be up anymore...
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
JFDionne
Posts: 2
Joined: Tue Feb 12, 2008 6:17 pm

Post by JFDionne »

Hi,
I just install the template with the last version of cacti 0.8.7b, I didn't check all the graph but I focus on the Threads/Abends, it seem to work, I got the graph, but I don't have all the data, it seem to miss the Aborted clients Aborted Connects and Threads Created, I put a gprint on each "fields" on the graph with the last value, and those fields are set at 0, but when I do the php cmd by hand, I got those:

Threads_cached:4 Threads_connected:1 Threads_created:5 Threads_running:1 Aborted_clients:0 Aborted_connects:9

but my gprint on the graph show it like:
Threads_cached:4 Threads_connected:1 Threads_created:0 Threads_running:1 Aborted_clients:0 Aborted_connects:0

I'm not an expert with Cacti and RRD, so I can't debug more myself, maybe someone can have an idea?

JFDionne
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest