Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 225804

Re: Getting data from a CSV into Hyperic?

$
0
0

Please UNSUBCRIBE ME

 

 

On Mon, Aug 19, 2013 at 6:11 PM, GodAtum <hq-users@hyperic.org> wrote:

 

I have edited the script so it only reads the last line in the csv:

 

#!/bin/bash

INPUT=finalTimes.csv

OLDIFS=$IFS

&& { echo "$INPUT file not found"; exit 99; }

lastline=`cat $INPUT | tail -1`

timestamp=`echo $lastline |cut -d, -f1`

rs1=`echo $lastline |cut -d, -f2`

rs2=`echo $lastline |cut -d, -f3`

rs3=`echo $lastline |cut -d, -f4`

rs4=`echo $lastline |cut -d, -f4`

 

    echo "timestamp=$timestamp"

    echo "ResponseTime1=$rs1"

    echo "ResponseTime2=$rs2"

    echo "ResponseTime3=$rs3"

    echo "ResponseTime4=$rs4"

IFS=$OLDIFS

 

however it does not give back any results in Hyperic.

 

>

 


Viewing all articles
Browse latest Browse all 225804

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>