Created
December 15, 2015 12:13
-
-
Save jangaraj/c8bdb48f0d139002316f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# values from management plugin | |
UserParameter=rabbitmq.statusmgmt[*],curl --connect-timeout 1 --max-time 1 -s -u `grep ^amqpuser /opt/zenoss/etc/global.conf | awk '{print $$2}'`:`grep ^amqppassword /opt/zenoss/etc/global.conf | awk '{print $$2}'` http://127.0.0.1:55672/api/$1 | python -c 'exec("try:\n import sys, simplejson; print simplejson.load(sys.stdin)[\"$2\"][\"$3\"][\"$4\"];\nexcept Exception, err:\n print 0;")' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment