From 34baccbec0f64222613052fee2ba4269450ed07a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ANNotunzdY=C2=AE?= Date: Mon, 26 Nov 2018 16:16:42 +0900 Subject: [PATCH] Modify for iw2018 --- Gemfile | 2 +- daemon | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index c0efa2a..44282a6 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ source 'https://rubygems.org' gem 'pit' -gem 'zabbixapi' +gem 'zabbixapi', git: 'https://github.com/svdasein/zabbixapi.git', branch: 'master' diff --git a/daemon b/daemon index 253739f..bb63475 100755 --- a/daemon +++ b/daemon @@ -47,10 +47,10 @@ class Zabbix @logger.info 'Zabbix::update: get items done.' # AP Associations count items.each do |item| - next unless item['name'] =~ /Ap If No Of Users/ - next unless item['key_'] =~ /(#{@apname_prefix}[0-9]{3})/ + next unless item['name'] =~ /Number of Clients/ + next unless item['key_'] =~ /(#{@apname_prefix}[0-9]{2})/ ap = $1 - next unless item['name'] =~ /((2\.4|5) GHz)/ + next unless item['name'] =~ /((2\.4|5)GHz)/ band = $1.sub('.', '_').gsub(" ", "") @associations[ap] = {} if @associations[ap].nil? @associations[ap][band] = item['lastvalue'].to_i