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

User regex not covering specific case #27

Open
vibexpro opened this issue Mar 3, 2020 · 3 comments
Open

User regex not covering specific case #27

vibexpro opened this issue Mar 3, 2020 · 3 comments

Comments

@vibexpro
Copy link

vibexpro commented Mar 3, 2020

Host operating system: output of uname -a Centos 7

flexlm_exporter version: output of flexlm_exporter --version v0.0.4-29-g66beca4-dirty

flexlm_exporter command line flags and relevant YAML configuration file information

Created docker-compose.yml:
version: '3.3'
services:
flexlm_exporter:
container_name: flexlm_exporter
user: root
ports:
- '9319:9319'
volumes:
- '/usr/local/sbin/:/usr/bin/flexlm/'
- '/opt/workarea/config/:/config/'
image: 'mjtrangoni/flexlm_exporter:master'
command: --path.lmutil="/usr/bin/flexlm/lmutil" --path.config="/config/licenses.yml"

license.yml

licenses:

  • name: vendor_server
    license_file: /config//.lic
    monitor_users: True
    monitor_reservations: True

Are you running flexlm_exporter in Docker? Yes

What did you do that produced an error? I searched for a specific user in Prometheus "flexlm_feature_used_users" graphs and noticed that the user field contain non-relvanet data.

The problem is with a specific feature on a vendor license
lmstat examples line:
user sever server:1 (v6.170) (sever/11111 22222), start Tue 3/3 14:14 ---> Catch by regex
user sever server:1 Placeholder One (v18.100) (sever/11111 22222), start Tue 3/3 14:11, 2 licenses --> Catch "user sever server:1" as user
user sever server:1 Placeholder Two-Three (Max. 4 cores) (v18.100) (sever/11111 22222), start Tue 3/3 14:11, 2 licenses --> Catch "user sever server:1 Placeholder Two-Three (Max." as user

What did you expect to see?

I expect to see user name

What did you see instead?

user name with additional data from lmstat line like the above example.
flexlm_exporter_user

Can you adjust the user regex to ignore everything between the username to version?
If not, can we use split by space on the group user?

Thanks.

@badies
Copy link

badies commented May 18, 2020

Hi,
We have the same issue, it seems that the regex needs to be adjusted for this case.

Please see demo

@badies
Copy link

badies commented May 19, 2020

#37

@mjtrangoni
Copy link
Owner

mjtrangoni commented May 20, 2020

Hi @HavivEderi,

Thanks for reporting. Why did you close the issue? I overlooked this it seems. I will check the output you put in the regex tester.

@mjtrangoni mjtrangoni reopened this May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants