(Solved) Monitor Citrix Licenses with Cacti

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

Moderators: Developers, Moderators

Post Reply
haraldok
Posts: 6
Joined: Mon May 11, 2009 3:21 pm

(Solved) Monitor Citrix Licenses with Cacti

Post by haraldok »

Anyone know a way to monitor Citrix license usage from Cacti? Cacti 0.8.7 c , running cmd.php as poller. Citrix Access Gateway 4.x got the OID .1.3.6.1.4.1.3845.20.1.15.0 for installed licenses, OID .1.3.6.1.4.1.3845.20.1.16.0 for used licenses, and OID .1.3.6.1.4.1.3845.20.1.18.0 for available licenses according to this: http://support.citrix.com/article/CTX119798
Last edited by haraldok on Fri Jun 26, 2009 4:55 am, edited 1 time in total.
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

Well, the quickest way would be to use the SNMP - Generic OID Template Data and Graph Templates.
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
haraldok
Posts: 6
Joined: Mon May 11, 2009 3:21 pm

Post by haraldok »

If you can tell me how, i would be very happy. How do i get Cacti to query the host with these OID's?
haraldok
Posts: 6
Joined: Mon May 11, 2009 3:21 pm

Post by haraldok »

I have tried this SNMP query:

<interface>
<name>Citrix Licenses</name>
<oid_index>.1.3.6.1.2.1</oid_index>


<fields>
<InstalledLicenses>
<name>Index</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.3845.20.1.15.0</oid>
</InstalledLicenses>
<UsedLicenses>
<name>Number</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.3845.20.1.16.0</oid>
</UsedLicenses>
<AvailableLicenses>
<name>Status</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.3845.20.1.18.0</oid>
</AvailableLicenses>

</fields>
</interface>

But i get Status "Success [0 Items, 0 Rows]" and if i click "verbose query" i get :
+ Located input field 'InstalledLicenses' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.3845.20.1.15.0'
+ Located input field 'UsedLicenses' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.3845.20.1.16.0'
+ Located input field 'AvailableLicenses' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.3845.20.1.18.0'

What do i do wrong?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

You didn't follow Linegod's suggestion and use the SNMP - Generic OID Template Data and Graph Templates. Read in the documentation site too for addition help.

snmpget those OIDs you want to data from to verify they're functional -- post the results here.
haraldok
Posts: 6
Joined: Mon May 11, 2009 3:21 pm

Post by haraldok »

I have got the XML query to run, and i get the data i want:

+ Running data query [22].
+ Found type = '3' [snmp query].
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/snmp_queries/cag.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.3845'
+ Index found at OID: 'enterprises.3845.20.1.15.0' value: '40'
+ Index found at OID: 'enterprises.3845.20.1.16.0' value: '1'
+ Index found at OID: 'enterprises.3845.20.1.17.0' value: '0'
+ Index found at OID: 'enterprises.3845.20.1.18.0' value: '39'
+ Index found at OID: 'enterprises.3845.20.1.19.0' value: '1'
+ Index found at OID: 'enterprises.3845.20.1.20.0' value: '1'
+ Index found at OID: 'enterprises.3845.20.1.21.0' value: '0'
+ Index found at OID: 'enterprises.3845.20.1.22.0' value: '0'
+ Index found at OID: 'enterprises.3845.20.1.23.0' value: '0'
+ Index found at OID: 'enterprises.3845.20.1.24.0' value: '2'
+ Located input field 'maxConnections' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.3845.20.1.15'
+ Found item [maxConnections='40'] index: 0 [from value]
+ Located input field 'usedConnections' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.3845.20.1.16'
+ Found item [usedConnections='1'] index: 0 [from value]
+ Located input field 'unusedConnections' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.3845.20.1.18'
+ Found item [unusedConnections='39'] index: 0 [from value]
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/snmp_queries/cag.xml'
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/snmp_queries/cag.xml'
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/snmp_queries/cag.xml'
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/snmp_queries/cag.xml'
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/snmp_queries/cag.xml'


But, no RRD is generated, and i get a "Status - unknown" in devices list. I can ping the host from the Cacti server, but something is obviously not right.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

You didn't create the snmp xml script properly. Try something like this. Add the additional fields you need. Post the verbose query of it too:

AccessGateway.xml

Code: Select all

<interface>
	<name>Get Citrix Access Gateway stats</name>
	<description>Access Gateway Enterprise MIB</description>
	<oid_index>.1.3.6.1.4.1.3845.20.1.15</oid_index>
	<oid_index_parse>OID/REGEXP:.*\.([0-9]{1,2})$</oid_index_parse> 
        <index_order>Index</index_order>
        <index_order_type>alphabetic</index_order_type>

	<fields>
		<Index>
                        <name>Index</name>
                        <source>index</source>
                        <direction>input</direction>
		</Index>

		<Licenses>
			<name>Licenses</name>
			<method>walk</method>
			<source>value</source>
			<direction>output</direction>
			<oid>.1.3.6.1.4.1.3845.20.1.15</oid>
		</Licenses>
		<Usedlicenses>
			<name>Usedlicenses</name>
			<method>walk</method>
			<source>value</source>
			<direction>output</direction>
			<oid>.1.3.6.1.4.1.3845.20.1.16</oid>
		</Usedlicenses>		
	</fields>
</interface>
haraldok
Posts: 6
Joined: Mon May 11, 2009 3:21 pm

Tried the xml script

Post by haraldok »

Sorry about the late answer, tried this xml script:

<interface>
<name>Get Citrix Access Gateway stats</name>
<description>Access Gateway Enterprise MIB</description>
<oid_index>.1.3.6.1.4.1.3845.20.1.15</oid_index>
<oid_index_parse>OID/REGEXP:.*\.([0-9]{1,2})$</oid_index_parse>
<index_order>Index</index_order>
<index_order_type>alphabetic</index_order_type>

<fields>
<Index>
<name>Index</name>
<source>index</source>
<direction>input</direction>
</Index>

<Licenses>
<name>Licenser</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.3845.20.1.15</oid>
</Licenses>
<Usedlicenses>
<name>Brukte lisenser</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.3845.20.1.16</oid>
</Usedlicenses>

</fields>
</interface>

The result:

Running data query [22].
+ Found type = '3' [snmp query].
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/snmp_queries/cag.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.3845.20.1.15'
+ Index found at OID: 'enterprises.3845.20.1.15.0' value: '40'
+ index_parse at OID: 'enterprises.3845.20.1.15.0' results: '0'
+ Inserting index data for field 'Index' [value='0']
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/snmp_queries/cag.xml'
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/snmp_queries/cag.xml'
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/snmp_queries/cag.xml'
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/snmp_queries/cag.xml'
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/snmp_queries/cag.xml'
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/snmp_queries/cag.xml'

I don't get any rrd file created, so where am i wrong?
haraldok
Posts: 6
Joined: Mon May 11, 2009 3:21 pm

Now working

Post by haraldok »

I got it to work, using the following xml query file, i had som errors in my setup of the data query:

<interface>
<name>Get Citrix Access Gateway stats</name>
<description>Access Gateway Enterprise MIB</description>
<oid_index>.1.3.6.1.4.1.3845.20.1</oid_index>
<oid_index_parse>OID/REGEXP:.*\.([0-9]{1,2})$</oid_index_parse>
<index_order>Index</index_order>
<index_order_type>alphabetic</index_order_type>

<fields>
<Index>
<name>Index</name>
<source>index</source>
<direction>input</direction>
</Index>

<Licenses>
<name>Licenses</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.3845.20.1.15</oid>
</Licenses>

<Usedlicenses>
<name>Usedlicenses</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.3845.20.1.16</oid>
</Usedlicenses>

<Availlicenses>
<name>Availlicenses</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.3845.20.1.18</oid>
</Availlicenses>


</fields>
</interface>
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests