Added simplified ConfFile entry using myops_setup_sh
[myops.git] / web / collect / sar2graphite.py
index cb679de..1efa910 100755 (executable)
@@ -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')