Skip to content

Commit

Permalink
Version 1.0.6
Browse files Browse the repository at this point in the history
- fix: Hard coded index name references (should be referring to the global macro)
- fix: Improved nix family detection, avoid relying on kernel metrics which is Linux specific and might mot be available if not configured
- fix: Missing host filter for network panel in Windows OS entity view
  • Loading branch information
guilhemmarchand committed Mar 13, 2019
1 parent b3fd986 commit 92d5242
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion DA-ITSI-TELEGRAF-OS/default/app.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ is_configured = 0

[launcher]
author = Guilhem Marchand
version = 1.0.5
version = 1.0.6
description = ITSI module for Influxdata Telegraf Operating Systems

[ui]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<title>Storage usage (GB) prediction for next 3 months</title>
<search>
<query>
| mstats latest(_value) as value where index="telegraf" metric_name=disk.used OR metric_name=disk.total `devices_exclusions` host=$host$ by metric_name, path span=1d
| mstats latest(_value) as value where `telegraf_index` metric_name=disk.used OR metric_name=disk.total `devices_exclusions` host=$host$ by metric_name, path span=1d
| eval {metric_name}=value
| stats first(disk.used) as disk.used, first(disk.total) as disk.total by _time, path
| stats sum(disk.used) as used, sum(disk.total) as total by _time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<table>
<title>file-systems usage</title>
<search>
<query>| mstats latest(_value) as value where index="telegraf" metric_name=disk.used OR metric_name=disk.total OR metric_name=disk.used_percent `devices_exclusions` host=$host$ by metric_name, path
<query>| mstats latest(_value) as value where `telegraf_index` metric_name=disk.used OR metric_name=disk.total OR metric_name=disk.used_percent `devices_exclusions` host=$host$ by metric_name, path
| eval {metric_name}=value
| stats first(disk.*) as "disk.*" by path
| eval "disk.total"=round(((('disk.total' / 1024) / 1024) / 1024),2), "disk.used"=round(((('disk.used' / 1024) / 1024) / 1024),2), "disk.used_percent"=round('disk.used_percent',2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@
<title>Network inbound/outbound traffic (KBps)</title>
<search depends="$chart1$">
<query>
| mstats avg(_value) as value where `telegraf_index` metric_name=win_net.Bytes_Received_persec OR metric_name=win_net.Bytes_Sent_persec host=* by metric_name span=1s
| mstats avg(_value) as value where `telegraf_index` metric_name=win_net.Bytes_Received_persec OR metric_name=win_net.Bytes_Sent_persec host=$host$ by metric_name span=1s
| eval {metric_name}=value
| stats first(win_net.*) as "*" by _time
| rename Bytes_Received_persec as inbound, Bytes_Sent_persec as outbound
Expand Down
2 changes: 1 addition & 1 deletion DA-ITSI-TELEGRAF-OS/default/macros.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# metrics indexes, the definition should match all metrics indexes

[telegraf_index]
definition = index="telegraf"
definition = index="telegraf*"
iseval = 0

# _____ _
Expand Down
8 changes: 4 additions & 4 deletions DA-ITSI-TELEGRAF-OS/default/savedsearches.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ search = | mstats latest(_value) as value where `telegraf_index` metric_name="sy
| stats first(nb_cpus) as nb_cpus, first(mem_total) as mem_total, first(swap_total) as swap_total by host\
| foreach *_total [ eval <<FIELD>> = round('<<FIELD>>', 0) ]\
| eval itsi_role="telegraf_host", family="Linux"\
| join type=inner host [ | mcatalog values(metric_name) as linux_kernel where index="telegraf" metric_name="kernel.*" by host ] | fields - linux_kernel\
| search NOT [ | mcatalog values(metric_name) as win_metrics where `telegraf_index` metric_name="win*" by host | table host ]\
| fields host, itsi_role, family, nb_cpus, mem_total, swap_total
request.ui_dispatch_app = itsi
request.ui_dispatch_view = search
Expand All @@ -33,15 +33,15 @@ request.ui_dispatch_view = search
#

[DA-ITSI-TELEGRAF-OS-Inventory_Search_windows]
search = | mstats latest(_value) as value where index="telegraf" metric_name=win_cpu.Percent_Idle_Time instance!=_Total by host, instance\
search = | mstats latest(_value) as value where `telegraf_index` metric_name=win_cpu.Percent_Idle_Time instance!=_Total by host, instance\
| stats dc(instance) as nb_cpus by host\
| join type=outer host\
[| mstats latest(_value) as mem_total where index="telegraf" metric_name="mem.total" by host\
[| mstats latest(_value) as mem_total where `telegraf_index` metric_name="mem.total" by host\
| eval mem_total=round(mem_total/1024/1024, 0) ]\
| fillnull value="NA" mem_total\
| eval itsi_role="telegraf_host", family="Windows"\
| join type=inner host\
[| mcatalog values(metric_name) as win_metrics where index="telegraf" metric_name="win*" by host ]\
[| mcatalog values(metric_name) as win_metrics where `telegraf_index` metric_name="win*" by host ]\
| eval windows_ad=if(match(win_metrics, "win_ad\."), "true", "false"), windows_dns=if(match(win_metrics, "win_dns\."), "true", "false"),\
windows_dfsn=if(match(win_metrics, "win_dfsn\."), "true", "false"), windows_dfsr=if(match(win_metrics, "win_dfsr\."), "true", "false"),\
windows_iis=if(match(win_metrics, "win_websvc"), "true", "false")\
Expand Down
Binary file removed DA-ITSI-TELEGRAF-OS_105.tgz
Binary file not shown.
Binary file added DA-ITSI-TELEGRAF-OS_106.tgz
Binary file not shown.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tar -xzf ${app}_*.spl
PWD=`pwd`
version=`grep 'version =' ${app}/default/app.conf | awk '{print $3}' | sed 's/\.//g'`

tar -czf ${app}_${version}.tgz ${app} --exclude=${app}/local --exclude=${app}/metadata/local.meta --exclude=${app}/lookups/lookup_file_backups --exclude=${app}/.idea
tar -czf ${app}_${version}.tgz --exclude=${app}/local --exclude=${app}/metadata/local.meta --exclude=${app}/lookups/lookup_file_backups --exclude=${app}/.idea ${app}
echo "Wrote: ${app}_${version}.tgz"

exit 0
7 changes: 7 additions & 0 deletions docs/releasenotes.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Release notes
#############

Version 1.0.6
=============

- fix: Hard coded index name references (should be referring to the global macro)
- fix: Improved nix family detection, avoid relying on kernel metrics which is Linux specific and might mot be available if not configured
- fix: Missing host filter for network panel in Windows OS entity view

Version 1.0.5
=============

Expand Down

0 comments on commit 92d5242

Please sign in to comment.