Script WMI and templates Win32 for Citrix Licenses

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
Oleev
Posts: 10
Joined: Fri May 18, 2012 9:01 am
Location: Caen, France
Contact:

Script WMI and templates Win32 for Citrix Licenses

Post by Oleev »

Hi guys,

I asked a question to jbiberian (http://forums.cacti.net/viewtopic.php?f=12&t=20675) about cacti windows templates (topic templates for Win32/Citrix/MSSQL) and WMI script.
I want to use citrix licences - whole farm to poll free/use/available Citrix licenses.
I have installed CTX SDK on my Cacti Server. It's ok.
I tested the vbs file on the Citrix License Server and results are good (
script_result.jpg
script_result.jpg (7.04 KiB) Viewed 2040 times
).
Citrix Licensing WMI service is start (
CTXLICWMI_service.jpg
CTXLICWMI_service.jpg (42.98 KiB) Viewed 2040 times
).

I only use get_ctxlicense.vbs, i've imported XML and have copied the XML files in path_cacti>/resource/script_queries/ dir.
I can add graph and create one with the template (All Citrix Licenses) but the graph is always empty...

Do I copy the VBS file anywhere? If, where ? ^^
Is the VBS file it use to poll (or just to "test" the connection ?) or do it called by the poller ?

I hope to be clear enough...!

I've noticed that the poller prompt display ERROR : Not enough arguments (
CWINDOWSSystem32svchost.exe.jpg
CWINDOWSSystem32svchost.exe.jpg (12.28 KiB) Viewed 2040 times
) since I use the template, so i'm sure there is an error... ^^

Could anyone help me !

If this could help you... : Turn On Debug Mode

RRDTool Command:
C:/rrdtool/rrdtool.exe graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="All Citrix Licenses" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit="0" \
--vertical-label="" \
--slope-mode \
--font TITLE:10: \
--font AXIS:7: \
--font LEGEND:8: \
--font UNIT:7: \
DEF:a="C\:/Inetpub/wwwroot/cacti/rra/6/211.rrd":"lic_used":AVERAGE \
DEF:b="C\:/Inetpub/wwwroot/cacti/rra/6/211.rrd":"lic_free":AVERAGE \
DEF:c="C\:/Inetpub/wwwroot/cacti/rra/6/211.rrd":"lic_total":AVERAGE \
AREA:a#002A97FF:"Used Licenses\n" \
GPRINT:a:LAST:"Current\:%8.0lf" \
GPRINT:a:AVERAGE:"Average\:%8.0lf" \
GPRINT:a:MAX:"Maximum\:%8.0lf\n" \
AREA:b#00CF00FF:"Free Licenses\n":STACK \
GPRINT:b:LAST:"Current\:%8.0lf" \
GPRINT:b:AVERAGE:"Average\:%8.0lf" \
GPRINT:b:MAX:"Maximum\:%8.0lf\n" \
LINE2:c#000000FF:"Total\:" \
GPRINT:c:LAST:" %8.0lf"
Best Regards, Oleev

Operating System: win32 Windows XP Professional SP3 i586
Webserver: IIS
Cacti: 0.8.8a
Spine: 0.8.8a
MySQL: 5.5
PHP: 5.3.10
RRDTool (Cygwin or Win32 build): 1.4x
Net-SNMP: 5.6.1.1
Cygwin (cygwin1.dll version):
Plugin Architecture: 3.1 (include in last release)
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Script WMI and templates Win32 for Citrix Licenses

Post by BSOD2600 »

Please read through the guides in http://docs.cacti.net on how to create scripts compatible with Cacti. It also includes steps on how to properly debug them (hint: cacti.log with high logging).
Oleev
Posts: 10
Joined: Fri May 18, 2012 9:01 am
Location: Caen, France
Contact:

Re: Script WMI and templates Win32 for Citrix Licenses

Post by Oleev »

Hi BSOD,

Thanks for your answer.
That's what I did...
If I understand, a Cacti WMI script must be "call" by a cron like the poller spine ?
My problem is the one : how the wmi script must be use for ?

I continue to read HowTos, Topics on forum...but I can't find a precisly answer.

Have a nice day,
Best Regards, Oleev

Operating System: win32 Windows XP Professional SP3 i586
Webserver: IIS
Cacti: 0.8.8a
Spine: 0.8.8a
MySQL: 5.5
PHP: 5.3.10
RRDTool (Cygwin or Win32 build): 1.4x
Net-SNMP: 5.6.1.1
Cygwin (cygwin1.dll version):
Plugin Architecture: 3.1 (include in last release)
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Script WMI and templates Win32 for Citrix Licenses

Post by BSOD2600 »

Yes, the cacti poller (cmd.php or spine.exe) will invoke your WMI script. It must be properly coded to run at the commandline and spit out the results (as per the documentation previously linked). The Cacti scheduled task user account is what will be used when authenticating to the remote Windows systems.
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests