Skip to content

feat: default trigger to store ts-input-packets-pps ts-output-packets-pps to tsdb - #1043

Open
rahul-kriplani-jnpr wants to merge 6 commits into
Juniper:jcloudfrom
rahul-kriplani-jnpr:feature/COL-1503/pfe-stats-fields-to-tsdb
Open

feat: default trigger to store ts-input-packets-pps ts-output-packets-pps to tsdb#1043
rahul-kriplani-jnpr wants to merge 6 commits into
Juniper:jcloudfrom
rahul-kriplani-jnpr:feature/COL-1503/pfe-stats-fields-to-tsdb

Conversation

@rahul-kriplani-jnpr

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

Copy link
Copy Markdown

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

Comment thread juniper_official/Solutions/Traffic-Blackhole/pfe-stats.rule
Comment thread juniper_official/Solutions/Traffic-Blackhole/pfe-stats.rule
Comment thread juniper_official/Solutions/Traffic-Blackhole/pfe-stats.rule
@rahul-kriplani-jnpr

Copy link
Copy Markdown
Author

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

Comment thread juniper_official/Solutions/Traffic-Blackhole/pfe-stats.rule
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
Copy Markdown
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

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

Copy link
Copy Markdown
Author

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
Copy Markdown
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

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

Copy link
Copy Markdown
Author

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
Copy Markdown
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
Copy Markdown
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?

Copy link
Copy Markdown
Author

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