Script To Monitor Citrix License Usage Report Template
The duty of System Administrator is really tough as he/she has to monitor the servers, users, logs, create backup and blah blah blah. For the most repetitive task most of the administrator write a script to automate their day-to-day repetitive task.
Lab: Part 10 – Citrix Licensing demystified. Everything you need to know about Citrix Licensing. Take a deep breath and jump in! Make sure to catch up this series. WMI in Windows Server is a treasure trove of information and well worth investigating, particularly when needing to run reports against many servers. In addition it. Given that Citrix Licensing is based on concurrency you may have different usage patterns at the time of day, month or year.
Here we have written a shell Script that do not aims to automate the task of a typical system admin, but it may be helpful at places and specially for those newbies who can get most of the information they require about their System, Network, Users, Load, Ram, host, Internal IP, External IP, Uptime, etc. We have taken care of formatting the output (to certain extent). The Script don’t contains any Malicious contents and it can be run using Normal user Account. In-fact it is recommended to run this script as user and not as root. Shell Script to Monitor Linux System Health You are free to use/modify/redistribute the below piece of code by giving proper credit to Tecmint and Author. We have tried to customize the output to the extent that nothing other than the required output is generated.
We have tried to use those variables which are generally not used by Linux System and are probably free. Minimum System Requirement All you need to have is a working Linux box. Dependency There is no dependency required to use this package for a standard Linux Distribution. Moreover the script don’t requires root permission for execution purpose. However if you want to Install it, you need to enter root password once.
Security We have taken care to ensure security of the system. Nothing additional package is required/installed. No root access required to run. Moreover code has been released under Apache 2.0 License, that means you are free to edit, modify and re-distribute by keeping Tecmint copyright. How Do I Install and Run Script? First, use following to download the monitor script 'tecmint_monitor.sh' and make it executable by setting appropriate permissions. # wget # chmod 755 tecmint_monitor.sh It is strongly advised to install the script as user and not as root.
It will ask for root password and will install the necessary components at required places. To install 'tecmint_monitor.sh' script, simple use -i (install) option as shown below../tecmint_monitor.sh -i Enter root password when prompted. If everything goes well you will get a success message like shown below. Password: Congratulations! Script Installed, now run monitor Command After installation, you can run the script by calling command 'monitor' from any location or user.
If you don’t like to install it, you need to include the location every-time you want to run it. #./Path/to/script/tecmint_monitor.sh Now run monitor command from anywhere using any user account simply as: $ monitor As soon as you run the command you get various System related information which are: • Internet Connectivity • OS Type • OS Name • OS Version • Architecture • Kernel Release • Hostname • Internal IP • External IP • Name Servers • Logged In users • Ram Usages • Swap Usages • Disk Usages • Load Average • System Uptime Check the installed version of script using -v (version) switch. Install Linux On Windows 10 more. $ monitor -v tecmint_monitor version 0.1 Designed by Tecmint.com Released Under Apache 2.0 License Conclusion This script is working out of the box on a few machines I have checked.
It should work the same for you as well. If you find any bug let us know in the comments.
This is not the end. This is the beginning. You can take it to any level from here. We’ve received few complaints that the script is not working on the few Linux distributions, and one of our regular reader Mr. Andres Tarallo, has taken the initiative and made the script compatible with all Linux distributions, you can find the updated script on GitHub.
If you feel like editing the script and carry it further you are free to do so giving us proper credit and also share the updated script with us so that we can update this article by giving you proper credit. Don’t forget to share your thoughts or your script with us. We will be here to help you. Thank you for all the love you have given us. Keep Connected!
We had an issue today where we ran out of Citrix Licenses and therefore some of the users were unable to login, the Citrix License server seems to be a pretty basic app with alerting feature. After purchasing and installing some licenses so that the users could gain access to there applications again we started thinking about ways to monitor this so it didn’t happen again. I was sure we could monitor this using powershell and started to look into it, first thing I came across was a explaining how to get license information from WMI, that guy has done some impressive stuff with Citrix and powershell, check it out on. Ok, so all looked fine and dandy, until we ran it and found that one of our licenses was not showing in the figures 🙠x81 Looking into it a bit more and exploring WMI gave us the same results, one of the licenses was missing. Sod’s law says it was the one we were after too!
Looking on the Internet again it would seem this is a “known problem” which there is a private fix for. Not to be beaten I thought of other ways to get this information, I know I had pulled information from websites before so decided to try and access the information direct from the license web page. Looking at the html code that was dumped, it was changing, this made it hard to just read the specific lines I wanted, so as you can see from the code I searched for the license type I wanted ‘Enterprise’ and then worked out where the figures are that I needed from there. If nothing, this is a useful script to see how to retrieve html information and work with it to get the end results.
Run it normally and if the License usage is above 90% it will fire off an email or run it with the send parameter to send an email anyway. Any comments or quires please leave a comment below.