Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with multiple licenses (license aggregation) in the same name field #61

Open
babainc opened this issue Jul 8, 2022 · 2 comments
Labels

Comments

@babainc
Copy link

babainc commented Jul 8, 2022

Hello,
I've a lack of metrics when multiple licenses are set in the same "name" field (namespace). Here is the licenses.yaml for a better understanding

 FlexLM Licenses to be monitored.
---
licenses:
  - name: questasim
    license_server: 1717@server-E1-X4,1718@server-E1-X4
    features_to_include: msimviewer,msimdataflow,msimhdlsim,msimhdlmix,msimcoverage
    monitor_users: True
    monitor_reservations: True
    monitor_versions: True

The system is running on a Debian11 linux server and the flexlm_exporter container use the latest docker version.
this container is started from a dockerfile that start also node_explorer (linux), blackbox_exporter, alertmanager, prometheus, graphana to monitor linux server activited and now the flexlm licenses activities ;)

What did you expect to see?

In this usecase, there is two licenses in the "questasim" namespace. These two licenses are on different port (1717 and 1718) and in my case the license are really close, so we have almost same token list and almost the same amount of seat per token.

What did you see instead?

I see only the first license (1717@server-E1-X4), the second one (1718@server-E1-X4) is not detected or has no metrics. If I split each licenses into differents "name" field (ie questasim1717 and questasim1718), both are properly detected with the correct token list and seat.
I use the graphana dashboard proposed in your markdown, and I see the number of seat for only one license (and due to license activities reported, I know that it is the first one that is processed). In graphana, the row indicating the server status and vendor status field show also only see one lines where I expected to see 2 lines one per listen port (to perform license port/nae distinction)

What did you expect?

In case of license aggregation on the same name, there is no information in the collected metrics indicating the license targeted, that can be separate easily (in my case) with the listening port 1717 or 1718.

We can consider the following usecase: IT want to aggregate multiple licenses in the same namespace (because it is the same software), to manage the token of this software at a batch level. So It would be nice to sum seat from duplicate token. Maybe this kind of computation can be done under a graphana panel but I don't know if it will be possible to do it easily in alertmanager.

@avelure
Copy link

avelure commented Aug 17, 2022

I have the same issue, but in this case there are different vendors on each port. The flexlm_server_status metric only lists the last server even though they are server processes on the machine. The issue seems to be the parsing in parseLmstatLicenseInfoServer of lmstat.go that makes dictionary of servers with the key being only the fqdn, so if another server shows up with same fqdn it gets overwritten.

Lmstat output:

lmutil lmstat -c 1902@SERVER;1903@SERVER
lmutil - Copyright (c) 1989-2019 Flexera. All Rights Reserved.
Flexible License Manager status on Wed 8/17/2022 13:40

[Detecting lmgrd processes...]
License server status: 1902@SERVER
    License file(s) on SERVER: C:\FlexLM\License.dat:

SERVER: license server UP (MASTER) v11.16.6

Vendor daemon status (on SERVER):

  actlmgrd: UP v11.16.1
     mgcld: UP v11.16.4
   snpslmd: UP v11.16.4


----------------------------------------------------------------------------
License server status: 1903@SERVER
    License file(s) on SERVER: C:\FlexLM\License_sigasi.dat:

SERVER: license server UP (MASTER) v11.16.6

Vendor daemon status (on SERVER):

    sigasi: UP v11.16.4


@mjtrangoni mjtrangoni added the bug label Aug 30, 2022
@mjtrangoni
Copy link
Owner

Hi @avelure,

Thanks for pointing this out! Feel free to summit a PR for handling the case, or I can take a look at it later on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants