From 2426485fe0d5d934fd66d8e8221985103df3cff3 Mon Sep 17 00:00:00 2001 From: "Costa Tsaousis (ktsaou)" Date: Mon, 31 Oct 2016 23:06:25 +0200 Subject: [PATCH] added another dimension to track excess received packets --- src/fping.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/fping.c b/src/fping.c index 4d00086..54544ef 100644 --- a/src/fping.c +++ b/src/fping.c @@ -1335,15 +1335,15 @@ void print_netdata( void ) printf("END\n"); if(!sent_charts) { - printf("CHART fping.%s_loss '' 'FPing Packet Loss for host %s' percentage '%s' fping.loss line 110010 %d\n", h->name, h->host, h->name, report_interval / 100000); - printf("DIMENSION pcent '' absolute 1 1\n"); + printf("CHART fping.%s_quality '' 'FPing Quality for host %s' percentage '%s' fping.quality line 110010 %d\n", h->name, h->host, h->name, report_interval / 100000); + printf("DIMENSION returned '' absolute 1 1\n"); + printf("DIMENSION lost '' absolute 1 1\n"); } - printf("BEGIN fping.%s_loss\n", h->name); + printf("BEGIN fping.%s_quality\n", h->name); if( h->num_recv_i <= h->num_sent_i ) { - printf("SET pcent = %d\n", h->num_sent_i > 0 ? - ( ( h->num_sent_i - h->num_recv_i ) * 100 ) / h->num_sent_i : 0 ); + printf("SET lost = %d\n", h->num_sent_i > 0 ? ( ( h->num_sent_i - h->num_recv_i ) * 100 ) / h->num_sent_i : 0 ); /* if (outage_flag) { // Time outage @@ -1354,10 +1354,10 @@ void print_netdata( void ) }/* IF */ else { - printf("SET pcent = %d\n", h->num_sent_i > 0 ? - ( ( h->num_recv_i * 100 ) / h->num_sent_i ) : 0 ); - + printf("SET lost = 0\n"); }/* ELSE */ + + printf("SET returned = %d\n", h->num_sent_i > 0 ? ( ( h->num_recv_i * 100 ) / h->num_sent_i ) : 0 ); printf("END\n"); if(!sent_charts) {