Monitor Netphone calls with Checkmk
The modular monitoring tool Checkmk gives you an overview of your Netphone servers.
With the network monitoring tool Checkmk you can record the number of simultaneously active calls of a Swyx or Netphone server. We have compiled the necessary settings for you below.
Step 1
The Checkmk Agent must be installed on the Swyxserver. In the file C:\ProgramData\checkmk\agent\check_mk.user.yml enter the following sequence in the section winperf:
winperf:
counters:
- SwyxServer: swyxserver
Step 2:
Create the file winperf_swyxserver with this content on the Checkmk server under /opt/omd/sites/<sitename>/local/share/check_mk/checks:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Example output from agent:
# <<<winperf_swyxserver>>>
# 1638893422.31 13616 10000000
# 2 1 rawcount
# 4 0 rawcount
# 6 1 rawcount
# 8 374 rawcount
# 10 29 rawcount
# 12 12 rawcount
# 14 1 rawcount
# 16 16 rawcount
# 18 0 rawcount
# 20 9 rawcount
# 22 0 rawcount
# 24 243 rawcount
# 26 7 rawcount
# 28 2174 raw_fraction
# -13616 2204 raw_base
# 32 30 raw_fraction
# -13616 2204 raw_base
# 36 747210 rawcount
# 38 1 rawcount
# 40 0 rawcount
# 42 1 rawcount
# 44 38 rawcount
# 46 0 rawcount
# 48 483 rawcount
# 50 0 counter
# 52 0 counter
# 54 0 counter
# 56 43 rawcount
# 58 32 rawcount
# 60 0 rawcount
# 62 0 rawcount
# 64 0 rawcount
# 66 2 rawcount
# 68 0 rawcount
# 70 0 rawcount
# 72 0 rawcount
# 74 1 rawcount
# 76 473 rawcount
# 78 37 rawcount
# Counters, relative to the base ID (e.g. 13616)
# 2 Active Calls.
# 4 Active External Calls.
# 6 Active Internal Calls.
def inventory_winperf_swyxserver(info):
if len(info) > 1:
return [(None, {})]
def check_winperf_swyxserver(_unused, params, info):
if not info or len(info) == 1:
return 3, "Performance counters not available"
active, external, internal = [int(l[1]) for l in info[1:4]]
state = 0
state_txt = []
for val, key, title in [(active, 'active', 'Active'), (external, 'external', 'External'), (internal, 'internal', 'Internal')]:
txt = '%d %s' % (val, title)
if key in params:
if val > params[key][0]:
state = 2
txt += '(!!)'
elif val > params[key][1]:
state = max(state, 1)
txt += '(!)'
state_txt.append(txt)
perfdata = [('active', active), ('external', external), ('internal', internal)]
return state, ", ".join(state_txt), perfdata
check_info["winperf_swyxserver"] = {
'check_function': check_winperf_swyxserver,
'inventory_function': inventory_winperf_swyxserver,
'service_description': 'Active Calls',
'has_perfdata': True,
'group': 'winperf_swyxserver',
}
Above file winperf_swyxserver for download
After a rescan of the services within the program, a new service called "Active Calls" is available to you, which you can also activate immediately.