Tracking Epicor licence usage

Hello,

I would like to see what methods users have devised for tracking licence usage to determine long term trend.

For example, suppose there are 20 licences. Users are happy as long as that limit is not reached. It could be regularly spiking to 18 or 19 active users.

I would like some mechanism that is not resource intensive to log usage as it changes.This way I could possibly see long term trend as to whether active licence usage is increasing over time and help justify budget submissions for more licences

1 Like

We implemented a scheduled (hourly) PowerShell script that looks at the APIā€™s Ice.BO.AdminSessionSvc/List method, counts the sessions per type and company, then feeds that back into a UD table. Then we were able to use that data to make a BAQ report that shows a chart of usage over a period with maximums displayed for each license type as well as the total.

This worked really well for us when we had a large influx of new users and were trying to figure out what the actual license usage looked like.

7 Likes

Thatā€™s a neat idea. I know some people are wary of updating tables outside of Epicor, so if someone wants a more temporary version that doesnā€™t make any db writes, I made a python version of this. Dumps stats to an Excel file with a datestamp. Just set it on a scheduled task.

Requires Python3 and two modules installed via pip described in the comments.
https://bitbucket.org/fievelm/scraps/src/master/Active%20Logins%20Recorder.py

3 Likes

That sounds good. Iā€™ve been tracking an issue where we keep running out of licenses since upgrading from 10.1.600 to 10.2.300.

I think weā€™ve actually got to the bottom of it - seems that Active Home Page if deployed to users is constantly refreshing on a timer, and keeping that user license active even if the user is away from their PC. Since tweaking a config file to disable auto refresh our issue seems to have eased.

Is the Powershell script something youā€™re willing to share?

Thanks!

Using a PS script, you can hook into a Monitoring system, Centreon https://www.centreon.com/en/, an open soure Linux based sever based on Nagios, to graph out easily and beautifully as needed. I wrote a PS script to work with the API on my last license count, you just need to install nsclient++ on your E10 app servers, then write the ps script to make a REST call to the Epicor session service

Iā€™m always willing to share - just had to sanitize it a bit and change the extension.
LicenseTracking.txt (3.4 KB)

Itā€™s set up to track DataCollection and DefaultUser sessions across two companies and write them back to a UD table. Add or remove companies as needed - the pattern is pretty simple.

Youā€™ll need to change some things, of course, but I did what I could to make it obvious. Items in <<>> should be replaced by your own options. <<Company1>> should be your company id, <<UDTable>> is the UD table you want to write back to, etc.

6 Likes

Nice.

This is awesome.
Thanks for the script!

Found this post while searching and want to say thank you. Weā€™ve been looking for a way to track our license usage and this will help us.

1 Like

I just posted this to Epicor Ideas: https://epicor-manufacturing.ideas.aha.io/ideas/ERP-I-240 - please vote it up!
If you arenā€™t familiar with Epicor Ideas, see @timshuwyā€™s post here: Epicor Ideas - Post and Vote for your favorite new feature! - #29 by ProgTech

Thank you @jstephens for the inspiration. Your work inspired me to create two ways of tracking license usage in my multi-company environment (10.2.700.10):

  1. I had to modify Jasonā€™s script to accommodate multiple companies on the same tenant. Attaching the script. Hopefully, the modifications will be easy for you guys as I tried to make it as clear as possible. UD table can be specified in the script as well as Live and Pilot environments for testing. Data inserted as: {Company:ā€™$companyā€™, Number01:ā€™$DefaultUserā€™, Number02:ā€™$DataCollectionā€™, Number03:ā€™$EnterpriseProcessingā€™, Key1: ā€˜$timeā€™}

  2. I prefer to use a monitoring software called PRTG Network Monitor. Itā€™s free for 100 sensors. I created a custom sensor that runs a similar script and collects that data and makes it look pretty.

  • After you install the software, place the attached file into C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML
  • Then add a custom sensor and choose ā€˜EXE/Script Advanced Sensorā€™.
  • Choose the file name that you placed in the previous step.
  • For the parameters use (modify to match your environment): -company ABC -creds bWFuYWdlcj****QzciR0ZWxsYXI= -url centralusdtapp00.epicorsaas.com/SaaS000 or -company ABC -user manager -pw MySecretPassword -url centralusdtapp00.epicorsaas.com/SaaS000. Where the creds parameter is base64 encoded string. This is a recommended way if you have special characters in your password. Use user and pw parameters first and the script will output that string on the first line for you (run it first on the server where PRTG is installed to make sure script runs. and copy the creds at that time). Company is the company code in Epicor. URL parameter is part of the app server address like https://[URL]/api/v1/Ice.BO.AdminSessionSvc/GetFilteredSessionList

Hopefully all of the above makes sense. Please ask if you need any clarification on the above.

LicenseTracking_ScheduledTask.ps1.txt (4.4 KB) E10_License_Tracking_PRTG.ps1.txt (3.5 KB)

2 Likes

Hello @AlekseyN

I have got this code working on a task, Iā€™m trying to add a date stamp to the output

My string looks like this

{Company:'$company', Number01:'$DefaultUser', Number02:'$DataCollection', Number03:'$EnterpriseProcessing', Date01:'$time', Key1: '$time'}"

When I add the Date01:'$time" it errors out with the following in the error log

09/04/2021  API write for 10TWG failed
@{returnObj=}

can you see anything wrong?

I have even tried creating a new variable for the date

$timeA = (get-date -Format "d/MM/yyyy")

with no formatting and with various different formatting

I found a way to add the date stamp using a BPM

Sorry for not replying sooner.

I do not see anything wrong with the code. Perhaps the Date01 field is picky in terms of data (itā€™s formatting) you are trying to write into itā€¦ I have not played with this field myself.

Perhaps in this format? REST Query - Filter on Date Property - #2 by ckrusen

Thanks for this. We are also interested in setting up something similar to track our license usage.

Excuse me if this a rookie mistake, as I am just beginning to play with REST and POSTMAN

When I try to filter by an object within the REST help or POSTMAN for Ice.BO.AdminSessionSvc it always returns the same results. For instance:
https://servername/environment/api/v1/Ice.BO.AdminSessionSvc/List?InUse=true
https://servername/environment/api/v1/Ice.BO.AdminSessionSvc/List?Expired=false
https://servername/environment/api/v1/Ice.BO.AdminSessionSvc/List?InstallationName=Company

Is there something I am doing incorrectly?

Thanks,
Matt Hermsen

@AlekseyN (or anyone) - What is an EnterpriseProcessing license? Weā€™ve got this working, but Iā€™m not clear on what those license types are. Sometimes Iā€™m on that list of users that have it, other times other office (aka DefaultUser). Usually itā€™s just a handful of users.

Do EnterpriseProcessing users get counted against our Office licenses? Or DataCollection? Or they just exist, and donā€™t get counted for anything? Or Related to Enterprise Search?

I found the UserTracker dashboard and Epicor Help articles, but they donā€™t explain the SessionType column.

Thanks!

Hey @askulte, check out KB0047344 - License Type Utilization in Epicor ERP 10

Thanks, Scott!

  • Enterprise Processing: any secondary session started from a Default session. This session type does not consume a licence. For example, switching companies in the application will start an Enterprise Processing license for the secondary session. If Service Connect is invoked from a BPM (Business Process Management) it will start an Enterprise Processing session.