From 7c296406ebfc231f2883441195d1a3608579b4ae Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Sun, 11 Dec 2016 16:16:52 +0100 Subject: [PATCH] added domain as separate tag --- ifstat.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ifstat.pl b/ifstat.pl index 4fe0f4f..6af1577 100755 --- a/ifstat.pl +++ b/ifstat.pl @@ -43,6 +43,8 @@ my @if; my @direction; my $lines; +my $host_tags = $host; +$host_tags =~ s/\./,domain=/; while(<$ifstat>) { chomp; @@ -65,7 +67,7 @@ while(<$ifstat>) { foreach my $i ( 0 .. $#if ) { - my @tags = ( "host=$host", $ENV{TAGS} || 'no_tags=true' ); + my @tags = ( "host=$host_tags", $ENV{TAGS} || 'no_tags=true' ); my $port = $if[$i]; if ( $port =~ m/if(\d\d)(\d\d\d\d)/ ) { -- 2.20.1