In order to get metrics of the number of dongles on virtualhere versus number of used dongles, we need to know the number of free and used dongles on the virtualhere server.
Is there a way to get that information trhough an API?
You just call "GET CLIENT STATE" regularly and it will show the dongles in use and not in use. You can parse that. See the example below showing a two servers. The first one has a SafeNet dongle in use by a user and the second server has an iLok not in use by anyone.
On the first server, the dongle is a SafeNet token and wKgB7w== is the base64 ip address of the person who is using it. If you convert that base64 to a uint32 number is returns c0a801ef in hex which is equivalent to ip address 192.168.1.239 and the user is "SYSTEM (SYSTEM)" (this particular user is running the client as a service so that is the username)
The second dongle is an iLok attached to a QNAP server which doesn't have anyone using it because it has a clientId of empty string (and a boundConnectionIp of AAAAAA== which is equivalent to 0)
ok. Know, running the secont time the command vhui64.exe -t "GET CLIENT STATE" I got the complete xml. The first time I only got what I've attach on my the previous message.
.
I dont know, what do you need to monitor virtualhere for?
Are you sure you dont need to monitor the server that virtualhere is running on instead?
Virtualhere Zabbix integration
Hi.
Our server is already monitored by zabbix.
But we need some information like number of free/used dongles from virtualhere.
If there were some virtualhere zabbix integration it would be nice.
If not, is there an api to get that information?
Regards,
Carlos
.
Those details are obtained from the client. https://www.virtualhere.com/client_api
(You can periodically call
vhui64.exe -t "GET CLIENT STATE"
to return an XML document which you can parse)Hi Michael.I've call it as…
Hi Michael.
I've call it as of your instructions.
The result I got was:
C:\Users\XPTO\Downloads>vhui64.exe -t "GET CLIENT STATE"
C:\Users\XPTO\Downloads><state>
<server>
<connection connectionId="58" secure="false" serverMajor="0" serverMinor="0" serverRevision="0" remoteAdmin="false" serverName="" interfaceName="" hostname="" serverSerial="10.10.10.2:7575" license_max_devices="-1" state="1" connectedTime="2024-05-16T10:02:05" host="10.10.10.2" port="7575" error="false" uuid="AAAAAAAAAAAAAAAAAAAAAA==" transportId="AAAAAAAAAAAAAAAAAAAAAA==" easyFindEnabled="false" easyFindAvailable="false" easyFindId="AAAAAAAAAAAAAAAAAAAAAA==" easyFindPin="AAAAAA==" easyFindAuthorized="0" ip="10.10.10.2"/>
</server>
</state>
Regards,
Carlos
.
OK? Whats the question?
Ok. sorry I thought you've…
Ok. sorry I thought you've read one of my last messages.
"But we need some information like number of free/used dongles from virtualhere."
The information that we need is not int the output of the vhui64.exe -t "GET CLIENT STATE".
Regards,
Carlos
.
It will show that when the client is connected to the server. Its not connected therefore it shows nothing.
Yes I realized that!In order…
Yes I realized that!
In order to get metrics of the number of dongles on virtualhere versus number of used dongles, we need to know the number of free and used dongles on the virtualhere server.
Is there a way to get that information trhough an API?
.
You just call
"GET CLIENT STATE"
regularly and it will show the dongles in use and not in use. You can parse that. See the example below showing a two servers. The first one has a SafeNet dongle in use by a user and the second server has an iLok not in use by anyone.On the first server, the dongle is a
SafeNet
token andwKgB7w==
is the base64 ip address of the person who is using it. If you convert that base64 to a uint32 number is returnsc0a801ef
in hex which is equivalent to ip address192.168.1.239
and the user is "SYSTEM (SYSTEM)
" (this particular user is running the client as a service so that is the username)The second dongle is an
iLok
attached to aQNAP
server which doesn't have anyone using it because it has aclientId
of empty string (and aboundConnectionIp
ofAAAAAA==
which is equivalent to0
)vhui64.exe -t "GET CLIENT STATE"
<state>
<server>
<connection connectionId="3" secure="false" serverMajor="4" serverMinor="6" serverRevision="4" remoteAdmin="false" serverName="ASUSTOR Hub" interfaceName="eth0" hostname="ASUSTOR" serverSerial="244bfe844c65" license_max_devices="0" state="3" connectedTime="2024-05-17T06:12:49" host="192.168.1.148" port="7575" error="false" uuid="YhNlYLUWTji5zIFRmgmwrw==" transportId="AAAAAAAAAAAAAAAAAAAAAA==" easyFindEnabled="false" easyFindAvailable="true" easyFindId="CTFvvGEDRUeBvMDmtRoMeQ==" easyFindPin="/LdeyQ==" easyFindAuthorized="0" ip="192.168.1.148"/>
<device vendor="SafeNet" product="Token JC" idVendor="1321" idProduct="1568" address="71" connectionId="3" state="3" serverSerial="244bfe844c65" serverName="ASUSTOR Hub" serverInterfaceName="eth0" deviceSerial="" connectionUUID="YhNlYLUWTji5zIFRmgmwrw==" boundConnectionUUID="fesgvCW3SPST3+0iGDf5hQ==" boundConnectionIp="wKgB7w==" boundConnectionIp6="AAAAAAAAAAAAAAAAAAAAAA==" boundClientHostname="WIN11DEV" nickname="" clientId="SYSTEM (SYSTEM)" numConfigurations="1" numInterfacesInFirstConfiguration="1" firstInterfaceClass="11" firstInterfaceSubClass="0" firstInterfaceProtocol="0" hideClientInfo="false" badSerial="false" parentHubPort="1" parentHubAddress="7" parentHubContainerID="AAAAAAAAAAAAAAAAAAAAAA==" parentHubContainerIDPrefix="0" containerID="AAAAAAAAAAAAAAAAAAAAAA==" containerIDPrefix="0" numPorts="0" autoUse="not-set"/>
</server>
<server>
<connection connectionId="5" secure="false" serverMajor="4" serverMinor="6" serverRevision="5" remoteAdmin="false" serverName="QNAP Hub" interfaceName="eth0" hostname="QNAP" serverSerial="245ebe468086" license_max_devices="0" state="3" connectedTime="2024-05-17T06:12:49" host="192.168.1.193" port="7575" error="false" uuid="L8MYyuQNQ86R4KgoVQnudA==" transportId="AAAAAAAAAAAAAAAAAAAAAA==" easyFindEnabled="false" easyFindAvailable="true" easyFindId="GVqgNSEoTsOa+Rj6AcgVyw==" easyFindPin="qIuWYQ==" easyFindAuthorized="0" ip="192.168.1.193"/>
<device vendor="iLok" product="iLok" idVendor="2190" idProduct="20534" address="11" connectionId="5" state="1" serverSerial="245ebe468086" serverName="QNAP Hub" serverInterfaceName="eth0" deviceSerial="5F8AA52B_4A29123C" connectionUUID="L8MYyuQNQ86R4KgoVQnudA==" boundConnectionUUID="AAAAAAAAAAAAAAAAAAAAAA==" boundConnectionIp="AAAAAA==" boundConnectionIp6="AAAAAAAAAAAAAAAAAAAAAA==" boundClientHostname="" nickname="" clientId="" numConfigurations="1" numInterfacesInFirstConfiguration="1" firstInterfaceClass="255" firstInterfaceSubClass="0" firstInterfaceProtocol="255" hideClientInfo="false" badSerial="false" parentHubPort="1" parentHubAddress="1" parentHubContainerID="AAAAAAAAAAAAAAAAAAAAAA==" parentHubContainerIDPrefix="0" containerID="AAAAAAAAAAAAAAAAAAAAAA==" containerIDPrefix="0" numPorts="0" autoUse="not-set"/>
</server>
</state>
ok. Know, running the secont…
ok. Know, running the secont time the command vhui64.exe -t "GET CLIENT STATE" I got the complete xml. The first time I only got what I've attach on my the previous message.
thank you.
Regards.