Skip to content

Conversation

@rahul-kriplani-jnpr
Copy link

@rahul-kriplani-jnpr rahul-kriplani-jnpr commented Jul 21, 2025

Added a default trigger to store ts-input-packets-pps, ts-output-packets-pps and ts-drop-packets-pps in TSDB

@rahul-kriplani-jnpr
Copy link
Author

@vvikramb, @gaddevijay, @sanjeevm-jsi Please review.

field ts-drop-packets-pps {
formula {
eval {
expression "($ts-input-packets-pps - $ts-output-packets-pps) * (($ts-input-packets-pps - $ts-output-packets-pps) > 0)";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this give drop pps? I don't think this is an accurate calculation

Copy link
Author

@rahul-kriplani-jnpr rahul-kriplani-jnpr Aug 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted the calculate max((ts-input-packets-pps - ts-output-packets-pps), 0) to achieve this I added such expression.
Also this is an outdated change, not part of the PR now as we are calculating this elsewhere.

expression "($ts-input-packets-pps - $ts-output-packets-pps) * (($ts-input-packets-pps - $ts-output-packets-pps) > 0)";
}
}
type unsigned-integer;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't store unsigned integer

Copy link
Author

@rahul-kriplani-jnpr rahul-kriplani-jnpr Aug 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw this being used for other fields (

) and as this was being derived from those fields I used the same type.
Also this is an outdated change, not part of the PR now.

type string;
description "FPC name";
}
trigger pfe-input-output-stats {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this look like a dummy trigger to me? Is AIML consuming any trigger data?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this needs to be stored? What is the purpose of this?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, its a dummy commit as we wanted to store ts-input-packets-pps and ts-output-packets-pps to TSDB to plot the Traffic Loss graph (in Routing and MPLS accordion) in real time like we plot the graphs for Hardware and Interfaces accordion.

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

Successfully merging this pull request may close these issues.

4 participants