MacTrack Site Statistics Graph Template

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

Moderators: Developers, Moderators

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

Post by TheWitness »

Spoonman,

You need the updated script_server.php from SVN. I fixed an issue with it after creating this template. Reviewed some of my early code in the process.... Frightening!

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?
spoonman
Cacti User
Posts: 305
Joined: Tue May 03, 2005 8:54 am
Location: GA

Post by spoonman »

Thanks....I believe i got that file yesterday after reviewing this post. I'll double check it. So for ex... i should be able to add this graph to any host, lets say the cacti server localhost. under that device i should click add graph template under associated graph templates and choose the mactrack template and hit create?? I dont see anything to add under associtaed data queries?

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

Post by TheWitness »

Spoonman,

That seems odd since it is a Data Query.

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?
spoonman
Cacti User
Posts: 305
Joined: Tue May 03, 2005 8:54 am
Location: GA

Post by spoonman »

Probably why its not working....i'll try and re-import the files.
spoonman
Cacti User
Posts: 305
Joined: Tue May 03, 2005 8:54 am
Location: GA

Post by spoonman »

Here's a pic of my import of the xml file..... i also put the other file in my scripts dir/ also grabbed the latest scriptserver file noted from SVN// You say it should show up in associated data queries?? you see anything wierd?

This is the second time i've imported the xml file...i see no new data only updates/////

also listed my data queries section...dont see mactrack

THX for your help.
Attachments
import.PNG
import.PNG (13.88 KiB) Viewed 3093 times
dataquery.PNG
dataquery.PNG (36.74 KiB) Viewed 3093 times
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Of course it would have helped if I had exported the correct thing. Here is the correct exported Elemenets.

TheWitness
Attachments
cacti_data_query_mactrack_site_statistics.xml
(23.06 KiB) Downloaded 305 times
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?
torstentfk
Cacti User
Posts: 367
Joined: Tue Apr 05, 2005 9:52 am
Location: Munich, Germany

Post by torstentfk »

TheWitness wrote:Of course it would have helped if I had exported the correct thing. Here is the correct exported Elemenets.

TheWitness
fine - now I have the query. But one thing is missing: the XML-File for the script server.
<path_cacti>/resource/script_server/mactrack_sites.xml

Torsten
spoonman
Cacti User
Posts: 305
Joined: Tue May 03, 2005 8:54 am
Location: GA

Post by spoonman »

Thanks Witness for the data query//// I do need that xml file also for the scripts server// I dont see it either.

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

Post by TheWitness »

I thought it was in the initial push. Well anyway...

TheWitness
Attachments
mactrack_sites.xml
(1.61 KiB) Downloaded 232 times
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?
spoonman
Cacti User
Posts: 305
Joined: Tue May 03, 2005 8:54 am
Location: GA

Post by spoonman »

Need alittle help on this one guys.....
Here is my cacti.log file for this stuff.

02/20/2006 03:10:47 PM - CACTID: Poller[0] Host[74] DS[832] SERVER: /home/www/htdocs/cacti/scripts/ss_mactrack_sites.php ss_mactrack_sites get total_user_ports 1, output: 2521
02/20/2006 03:10:47 PM - CMDPHP: Poller[0] DEBUG: SQL Cell: "SELECT total_user_ports FROM mac_track_sites WHERE site_id='1'"
02/20/2006 03:10:47 PM - PHPSVR: Poller[0] DEBUG: INC: '/home/www/htdocs/cacti/scripts/ss_mactrack_sites.php' FUNC: 'ss_mactrack_sites' PARMS: 'get total_user_ports 1'
02/20/2006 03:10:47 PM - PHPSVR: Poller[0] SERVER: output 847
02/20/2006 03:10:47 PM - CACTID: Poller[0] DEBUG: SQLCMD: insert into poller_output (local_data_id,rrd_name,time,output) values (832,'oper_ports','2006-02-20 15:10:02','847')
02/20/2006 03:10:47 PM - CACTID: Poller[0] Host[74] DS[832] SERVER: /home/www/htdocs/cacti/scripts/ss_mactrack_sites.php ss_mactrack_sites get total_oper_ports 1, output: 847
02/20/2006 03:10:47 PM - CMDPHP: Poller[0] DEBUG: SQL Cell: "SELECT total_oper_ports FROM mac_track_sites WHERE site_id='1'"
02/20/2006 03:10:47 PM - PHPSVR: Poller[0] DEBUG: INC: '/home/www/htdocs/cacti/scripts/ss_mactrack_sites.php' FUNC: 'ss_mactrack_sites' PARMS: 'get total_oper_ports 1'
02/20/2006 03:10:47 PM - PHPSVR: Poller[0] SERVER: output 847
02/20/2006 03:10:47 PM - CACTID: Poller[0] DEBUG: SQLCMD: insert into poller_output (local_data_id,rrd_name,time,output) values (832,'macs','2006-02-20 15:10:02','847')
02/20/2006 03:10:47 PM - CACTID: Poller[0] Host[74] DS[832] SERVER: /home/www/htdocs/cacti/scripts/ss_mactrack_sites.php ss_mactrack_sites get total_macs 1, output: 847
02/20/2006 03:10:47 PM - CMDPHP: Poller[0] DEBUG: SQL Cell: "SELECT total_macs FROM mac_track_sites WHERE site_id='1'"
02/20/2006 03:10:47 PM - PHPSVR: Poller[0] DEBUG: INC: '/home/www/htdocs/cacti/scripts/ss_mactrack_sites.php' FUNC: 'ss_mactrack_sites' PARMS: 'get total_macs 1'
02/20/2006 03:10:47 PM - PHPSVR: Poller[0] SERVER: output 1381
02/20/2006 03:10:47 PM - CACTID: Poller[0] DEBUG: SQLCMD: insert into poller_output (local_data_id,rrd_name,time,output) values (832,'ips','2006-02-20 15:10:02','1381')
02/20/2006 03:10:47 PM - CACTID: Poller[0] Host[74] DS[832] SERVER: /home/www/htdocs/cacti/scripts/ss_mactrack_sites.php ss_mactrack_sites get total_ips 1, output: 1381
02/20/2006 03:10:47 PM - CMDPHP: Poller[0] DEBUG: SQL Cell: "SELECT total_ips FROM mac_track_sites WHERE site_id='1'"
02/20/2006 03:10:47 PM - PHPSVR: Poller[0] DEBUG: INC: '/home/www/htdocs/cacti/scripts/ss_mactrack_sites.php' FUNC: 'ss_mactrack_sites' PARMS: 'get total_ips 1'
02/20/2006 03:10:47 PM - PHPSVR: Poller[0] SERVER: output 0
02/20/2006 03:10:47 PM - CACTID: Poller[0] DEBUG: SQLCMD: insert into poller_output (local_data_id,rrd_name,time,output) values (832,'errors','2006-02-20 15:10:02','0')
02/20/2006 03:10:47 PM - CACTID: Poller[0] Host[74] DS[832] SERVER: /home/www/htdocs/cacti/scripts/ss_mactrack_sites.php ss_mactrack_sites get total_device_errors 1, output: 0
02/20/2006 03:10:47 PM - CMDPHP: Poller[0] DEBUG: SQL Cell: "SELECT total_device_errors FROM mac_track_sites WHERE site_id='1'"
02/20/2006 03:10:47 PM - PHPSVR: Poller[0] DEBUG: INC: '/home/www/htdocs/cacti/scripts/ss_mactrack_sites.php' FUNC: 'ss_mactrack_sites' PARMS: 'get total_device_errors 1'
02/20/2006 03:10:47 PM - CACTID: Poller[0] DEBUG: SQLCMD: insert into poller_output (local_data_id,rrd_name,time,output) values (832,'devices','2006-02-20 15:10:02','15')
02/20/2006 03:10:47 PM - CACTID: Poller[0] Host[74] DS[832] SERVER: /home/www/htdocs/cacti/scripts/ss_mactrack_sites.php ss_mactrack_sites get total_devices 1, output: 15
02/20/2006 03:10:47 PM - PHPSVR: Poller[0] SERVER: output 15
02/20/2006 03:10:47 PM - CMDPHP: Poller[0] DEBUG: SQL Cell: "SELECT total_devices FROM mac_track_sites WHERE site_id='1'"
02/20/2006 03:10:47 PM - PHPSVR: Poller[0] DEBUG: INC: '/home/www/htdocs/cacti/scripts/ss_mactrack_sites.php' FUNC: 'ss_mactrack_sites' PARMS: 'get total_devices 1'
02/20/2006 03:10:47 PM - CACTID: Poller[0] DEBUG: SQLCMD: update host set status='3',status_event_count='0', status_fail_date='0000-00-00 00:00:00',status_rec_date='0000-00-00 00:00:00',status_last_error='',min_time='0.000000',max_time='0.000000',cur_time='0.000000',avg_time='0.000000',total_polls='62',failed_polls='0',availability='100.0000' where id='74'
02/20/2006 03:10:47 PM - CACTID: Poller[0] Host[74] SNMP Result: Host does not require SNMP
02/20/2006 03:10:47 PM - CACTID: Poller[0] Host[74] PING Result: PING: Host does not require ping




I can't get any data to transfer to the graphs?? I see all the results from the scripts but graph just says nan for all data? Any ideas??
spoonman
Cacti User
Posts: 305
Joined: Tue May 03, 2005 8:54 am
Location: GA

Post by spoonman »

I take that back.........came in this am and i see data on the graph. It is still alittle wierd though....seems the data only drew from 3pm yesterday to 7am this am. and now its stopped/// what setting could be casing that??
Gonna browse through my settings page.

THX
Attachments
mactrack.PNG
mactrack.PNG (16.72 KiB) Viewed 2974 times
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

The step is step is setup for every 4 hours in the data template. If you want finer grained control, you will need to reduce the step and then recreate/alter your RRD files.

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?
spoonman
Cacti User
Posts: 305
Joined: Tue May 03, 2005 8:54 am
Location: GA

Post by spoonman »

I've noticed that it is pulling data fine and drwing the graphs perfectly, I just thought it was intermittenly working?? But I get data fine its just 2 hours behind it seems. You say its step is every 4 hours??? Its cool.

I can live with how its working...

THX for the great templates and queries.
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

To fix the updating issue, delete your RRD files for the Site Statistics, but only after you have changed the value in the attached from 14400 to something like 300 (aka 5 minutes) or more in line with your scan frequency.

At my office, it was 4 hours, that is why I set the step to be 14400 (4 hours).

TheWitness
Attachments
MacTrackSiteStatsDataTemplate.JPG
MacTrackSiteStatsDataTemplate.JPG (54.88 KiB) Viewed 2906 times
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?
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

I'm almost positive I did everything I needed to do to get this thing working - but i'm not getting any data. The only thing even slightly out of the orginary is I changed the interval time - before creatign the graphs.

Ideas?
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests