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

asmState pseudo-metric: value is incorrect #151

Closed
amolari opened this issue Jul 17, 2021 · 2 comments
Closed

asmState pseudo-metric: value is incorrect #151

amolari opened this issue Jul 17, 2021 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@amolari
Copy link

amolari commented Jul 17, 2021

Environment

  • Telemetry Streaming Version: 1.21
  • BIG-IP Version: 14.1.4

Summary

Running the command that produces the output for pseudo-metric "asmState" directly on my system, the output doesn't produce the expected result. Therefor, that pseudo-metric result is not valid.
Please either fix the command:

{
"name": "asmQuery",
"path": "/mgmt/tm/util/bash",
"ignoreCached": true,
"body": {
"command": "run",
"utilCmdArgs": "-c \"/bin/mysql -uroot -p$(/bin/perl -MPassCrypt -nle 'print PassCrypt::decrypt_password($_)' /var/db/mysqlpw) PLC -B -e 'select CASE WHEN max(event_time) IS NOT NULL THEN \\\"Pending Policy Changes\\\" ELSE \\\"Policies Consistent\\\" END as asm_state, max(event_time) as last_asm_change from PL_CONFIG_LOG where event_type <> 2 and element_type <> 18 and event_time > (select max(from_date) as asm_last_changed from PL_POLICY_HISTORY)' | sed 's/\\t/,/'\""
}
},

or remove that pseudo-metric asmState.

Steps To Reproduce

asmState metric is the output of command
/bin/mysql -uroot -p$(/bin/perl -MPassCrypt -nle 'print PassCrypt::decrypt_password($_)' /var/db/mysqlpw) PLC -B -e 'select CASE WHEN max(event_time) IS NOT NULL THEN "Pending Policy Changes" ELSE "Policies Consistent" END as asm_state, max(event_time) as last_asm_change from PL_CONFIG_LOG where event_type <> 2 and element_type <> 18 and event_time > (select max(from_date) as asm_last_changed from PL_POLICY_HISTORY)' | sed 's/\\t/,/'

My test system has 2 policies which are in PENDING APPLY.

Expected Behavior

Output of command (which is the value of pseudo-metric) should be Pending Policy Changes

Actual Behavior

Output of command (which is the value of pseudo-metric) is:

asm_state       last_asm_change
Policies Consistent     NULL
@amolari amolari added bug Something isn't working untriaged Issue needs to be reviewed for validity labels Jul 17, 2021
@dstokesf5
Copy link
Contributor

Thank you for reporting this issue. I have added it to our internal product backlog as AUTOTOOL-2641.

@dstokesf5 dstokesf5 removed the untriaged Issue needs to be reviewed for validity label Aug 11, 2021
@dstokesf5 dstokesf5 added this to the v1.23.0 milestone Sep 21, 2021
@dstokesf5
Copy link
Contributor

This was resolved with the 1.23.0 release of Telemetry Streaming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants