Filter out uptime change notification

Hello,

I have changes being sent to slack, and I am getting a notification for every time oxidized runs and sees the system uptime change. I’m not clear on how I wold filter that out from being treated as a “change”.

Notification:

@@ -36,7 +36,7 @@
 ! Copyright (c) 1999-2012 by Dell Inc. All Rights Reserved.
 ! Build Time: Thu Sep 27 14:03:07 PDT 2012
 ! Build Path: /sites/sjc/work/build/buildSpaces/build02/E8-4-2/SW/SRC/Cp_src/Tacacs
-! sw0. uptime is 5 year(s), 4 week(s), 1 day(s), 0 hour(s), 47 minute(s)
+! sw0. uptime is 5 year(s), 4 week(s), 1 day(s), 1 hour(s), 15 minute(s)
 ! 
 ! System Type: S25N 
 ! Control Processor: Freescale MPC8541E with 268435456 bytes of memory.

Config:

---
username: un
password: pw
model: EOS
interval: 900
log: /home/oxidized/.config/log
use_syslog: false
debug: true
threads: 15
timeout: 300
retries: 3
prompt: !ruby/regexp /^([\[email protected]]+[#>]\s?)$/
pid: /home/oxidized/.config/pid
rest: 192.168.0.1:8080

vars:
  remove_secret: true
  auth_methods: [ "none", "password", "keyboard-interactive" ]

groups: {}

input:
  default: ssh
  debug: true
  ssh:
    secure: false

output:
  default: git
  git:
    single_repo: true
    user: oxidized
    email: [email protected]
    repo: "/var/data/oxidized/oxidized.git"

source:
  default: http
  http:
    url: https://server/api/v0/oxidized
    delimiter: !ruby/regexp /:/
    user: oxidized
    pass: oxidized
    map:
      name: hostname
      model: os
      group: group
    headers:
      X-Auth-Token: 'token'

hooks:
  slack:
    type: slackdiff
    events: [post_store]
    token: token
    channel: "#channel"

model_map:
  arista_eos: eos
  force10: ftos
  dell: dnos
  cisco: ios
  apc: apc_aos

Any help would be appreciated.

Thank you,
J

I did look at the dnos.rb file, and see this:

class DNOS < Oxidized::Model
  # Force10 DNOS model #

  comment  '! '

  cmd :all do |cfg|
    cfg.gsub! /^% Invalid input detected at '\^' marker\.$|^\s+\^$/, ''
    cfg.gsub! /^Dell Networking OS uptime is\s.+/, '' # Omit constantly changing uptime info
    cfg.each_line.to_a[2..-2].join
  end

I’ve just now realized that this isn’t filtering out that system uptime as a change at all in oxidized. So, basically this part of the code isn’t working.

-J

This is already fixed in a new version it’s just not released.

For now you could download https://raw.githubusercontent.com/ytti/oxidized/master/lib/oxidized/model/dnos.rb into ~/.config/oxidized/model/dnos.rb

1 Like

Cool. Thanks! That helped.