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

Ingress/egress filter alarms #986

Merged
merged 1 commit into from
Oct 2, 2017
Merged

Ingress/egress filter alarms #986

merged 1 commit into from
Oct 2, 2017

Conversation

dpino
Copy link
Member

@dpino dpino commented Sep 29, 2017

This PR implements the following alarms:

  • Ingress filter v4 rejects over N packets/s
  • Ingress filter v6 rejects over N packets/s
  • Egress filter v6 rejects over N packets/s
  • Egress filter v6 rejects over N packets/s

Partially fixes #965

@dpino
Copy link
Member Author

dpino commented Sep 29, 2017

To test it, I manually increased 'rxdrops' counter in pcap_filter:push and the limit was reached and the alarms triggered:

Excerpt of alarms get-state:

    alarm {
      alarm-type-id filtered-packets;
      alarm-type-qualifier egress-v6;
      resource 18482;
      alarm-text "More than 1,000,000 packets filtered per second";
      is-cleared false;
      last-changed 2017-09-29T15:08:10Z;
      perceived-severity warning;
      status-change {
        time 2017-09-29T15:08:10Z;
        alarm-text "More than 1,000,000 packets filtered per second";
        perceived-severity warning;
      }
      time-created 2017-09-29T15:08:10Z;
    }
    last-changed 2017-09-29T15:08:10Z;
    number-of-alarms 4;
  }
  summary {
    alarm-summary {
      cleared 0;
      cleared-closed 0;
      cleared-not-closed 0;
      not-cleared-closed 0;
      not-cleared-not-closed 4;
      total 4;
    }

Copy link

@wingo wingo left a comment

Choose a reason for hiding this comment

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

LGTM with one wee question

local alarm_key = {
resource=tostring(S.getpid()),
alarm_type_id='filtered-packets',
alarm_type_qualifier=conf.alarm_type_qualifier
Copy link

Choose a reason for hiding this comment

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

Is it OK if this is nil?

Copy link
Member Author

Choose a reason for hiding this comment

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

Likely not, better to set to empty string if nil.

Copy link
Member Author

Choose a reason for hiding this comment

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

alarm-type-quailifier is not mandatory either in the definition of alarm-types and alarms, so I think it's fine if it's nil.

@dpino dpino merged commit b835551 into Igalia:lwaftr Oct 2, 2017
@dpino dpino deleted the ingress-filter branch October 2, 2017 05:20
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.

Implement alarms facility for Snabb and the lwAFTR
2 participants