1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-27 03:14:45 +00:00

[monit_parser] use python2/3 compatible 'print' style

This commit is contained in:
Lars Kruse 2016-10-23 01:27:50 +02:00
parent 9d62e55896
commit dcd9434e0d

View file

@ -54,16 +54,16 @@ for line in output:
continue continue
if len(sys.argv) > 1 and sys.argv[1] == 'config': if len(sys.argv) > 1 and sys.argv[1] == 'config':
print 'graph_title Per process stats from Monit' print('graph_title Per process stats from Monit')
print 'graph_vlabel numbers' print('graph_vlabel numbers')
print 'graph_category monit' print('graph_category monit')
for process in procs: for process in procs:
for stat in procs[process]: for stat in procs[process]:
print "monit_%s_%s.label %s.%s" % (process, stat, process, stat) print("monit_%s_%s.label %s.%s" % (process, stat, process, stat))
if stat == 'total_memory': if stat == 'total_memory':
print "monit_%s_%s.warning 1:" % (process, stat) print("monit_%s_%s.warning 1:" % (process, stat))
sys.exit(0) sys.exit(0)
for process in procs: for process in procs:
for stat in procs[process]: for stat in procs[process]:
print "monit_%s_%s.value %s" % (process, stat, procs[process][stat]) print("monit_%s_%s.value %s" % (process, stat, procs[process][stat]))