X-Git-Url: http://git.onelab.eu/?p=myops.git;a=blobdiff_plain;f=web%2Fcollect%2Fsar2graphite.py;h=1efa910e1cb95b2bf8369779191d6b3d2a8c4349;hp=cb679de0f4991122f13fe9496f29b04b04cd572e;hb=bccc4741c3264bc2d8c47c7ab06eb691fb3a8582;hpb=9bb5213371c2a3075adaed95d0e1e6ef5a58e7d6 diff --git a/web/collect/sar2graphite.py b/web/collect/sar2graphite.py index cb679de..1efa910 100755 --- a/web/collect/sar2graphite.py +++ b/web/collect/sar2graphite.py @@ -48,6 +48,7 @@ def main(): ghost_input = os.popen("/bin/hostname", 'r') config.ghost = ghost_input.read().strip() + sysstat_check = os.popen("if ! rpm -q sysstat > /dev/null ; then yum install -y sysstat ; fi ", 'r').read() hostname_input = os.popen("/bin/hostname | sed -e 's/\./_/g' ", 'r') sar_input = os.popen("/usr/bin/sar %s %s 1" % (config.sarargs, config.seconds), 'r') nc_output = os.popen("/usr/bin/nc %s 2003" % config.ghost, 'w')