Skip to content

Commit

Permalink
Replace ARP resource identifier for PID
Browse files Browse the repository at this point in the history
  • Loading branch information
dpino committed Sep 27, 2017
1 parent ebeca50 commit 162caff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/apps/ipv4/arp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,17 @@ local datagram = require("lib.protocol.datagram")
local ethernet = require("lib.protocol.ethernet")
local ipv4 = require("lib.protocol.ipv4")
local alarms = require("lib.yang.alarms")
local S = require("syscall")

alarms.add_to_inventory {
[{alarm_type_id='arp-resolution'}] = {
resource='nic-v4',
resource=tostring(S.getpid()),
has_clear=true,
description='Raise up if ARP app cannot resolve IP address',
}
}
local resolve_alarm = alarms.declare_alarm {
[{resource='nic-v4', alarm_type_id='arp-resolution'}] = {
[{resource=tostring(S.getpid()), alarm_type_id='arp-resolution'}] = {
perceived_severity = 'critical',
alarm_text = 'Make sure you can ARP resolve IP addresses on NIC',
},
Expand Down

0 comments on commit 162caff

Please sign in to comment.