Not a customer? Click the 'Start a free trial' link to begin a 30-day SaaS trial of our product and to join our community.
Existing Cisco AppDynamics customers should click the 'Sign In' button to authenticate to access the community
11-21-2024 03:46 AM
1] Tried using Until since to pull the no of days between the expirationDateTime and system date, based on token name as we have many token names
expirationDateTime | eventTimestamp | pickupTimestamp |
2025-07-26T23:00:03+05:30 | 2024-11-21T17:06:33+05:30 | 2024-11-21T17:06:33+05:30 |
Token name |
AppD |
can you suggest the query to be used such that we get value in no of days the certificate gets expired
11-25-2024 10:08 AM
Hi @Uma.Boppana,
Thank you for asking your question on the community. Did you happen to find a solution to your question or any new information you can share here?
If not, and you are still looking for help, you can contact AppDynamics Support: How to contact AppDynamics Support and manage existing cases with Cisco Support Case Manager (SCM)
Thanks,
Ryan, Cisco AppDynamics Community Manager
Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.
Check out Observabiity in Action
new deep dive videos weekly in the Knowledge Base.
11-26-2024 01:50 AM
Hi Uma
You just have to create a metric per Token and use a query like this
SELECT toInt(expirationDateTime- eventTimestamp) AS "Seconds" which will give you the difference in seconds between the dates, you can then further multiply the seconds to get minutes/hours or days if you want to rather use that.
This will give you the metric to tell you how much seconds/minutes/hours/days to expiry and you can then alert on it
Ciao
12-05-2024 01:55 AM
Hi Ryan,
Support provided query for which we are unable to create metrics .
we have tweeked s below
SELECT (toInt(tokenExpirationDateTime - now()) / (24*60*60*1000)) AS daysleft FROM intune_dep WHERE tokenName = "Wipro-EY-Intune" AND (toInt(tokenExpirationDateTime - now()) / (24*60*60*1000)) >= 30
and when created metrics we are getting error
Following fields (toInt(tokenExpirationDateTime - now()) / (24*60*60*1000)) AS daysleft in the select clause are not supported.
could you help on the query
12-05-2024 12:22 PM
@Mario.Morelli can you provide any further insight for @Uma.Boppana on this?
Thanks,
Ryan, Cisco AppDynamics Community Manager
Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.
Check out Observabiity in Action
new deep dive videos weekly in the Knowledge Base.
12-06-2024 12:15 AM
There are some limitations with what functions you can use with the analytics metrics with only aggregation queries supported min,max avg etc..
try and use this , the max value essentially will do nothing and not change the value, but it allows the metric to be saved as you use an aggregation function
SELECT max(toInt((toInt(tokenExpirationDateTime - now()) / (24*60*60*1000)))) FROM intune_dep WHERE tokenName = "Wipro-EY-Intune" AND (toInt(tokenExpirationDateTime - now()) / (24*60*60*1000)) >= 30
SELECT max(toInt((tokenExpirationDateTime - now()) / (24*60*60*1000)))) FROM intune_dep WHERE tokenName = "Wipro-EY-Intune" AND (toInt(tokenExpirationDateTime - now()) / (24*60*60*1000)) >= 30
Let me know if this works
12-06-2024 03:39 AM
Hi Mario,
Thanks, query worked as we input max
can we do to alias the result filed name (toInt((tokenExpirationDateTime - now()) / (24*60*60*1000)))) to tokenExpirationDateTime
12-10-2024 11:38 PM
Hi Uma
As far as I know you cant uses alias field, but that shouldn't be an issue, as you are creating the metric, just name it what you require then the metric will be named as you need it in the health rules and dashboards
12-19-2024 02:36 AM
Hi Mario,
Thanks for the response. When i added the query as metric, i m getting old value.
For ex, the expiration days are 219 days. but it shows 229 days on the day when i created the metric. why is that it not showing the current value. the value is not changing.
12-19-2024 02:40 AM
we are feeding data for every 5 mins and if you see the data its 229 all the time in metric graph where as when we execute the query its different 219 value.
16/12/2024 23:55:00,46,0,229,229,5
17/12/2024 23:55:00,46,0,229,229,5
18/12/2024 23:55:00,46,0,229,229,5
Thank you! Your submission has been received!
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form