Faidon Liambotis has uploaded a new change for review.
https://gerrit.wikimedia.org/r/88056
Change subject: swift: swift-ganglia-report-global-stats for eqiad
......................................................................
swift: swift-ganglia-report-global-stats for eqiad
Fix the hardcoded ms-fe.pmtpa.wmnet in the script. The mechanism &
script desperately needs to be rewritten but let's do that as a later
step; let's fix feature parity of pmtpa/eqiad first.
Change-Id: I207647b7bec510429978c540730c2a863d964cbe
---
M files/swift/swift-ganglia-report-global-stats
1 file changed, 4 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/56/88056/1
diff --git a/files/swift/swift-ganglia-report-global-stats
b/files/swift/swift-ganglia-report-global-stats
index 2125c20..8c6d032 100755
--- a/files/swift/swift-ganglia-report-global-stats
+++ b/files/swift/swift-ganglia-report-global-stats
@@ -14,8 +14,7 @@
headers['X-Auth-User'] = username
headers['X-Auth-Key'] = password
headers['User-Agent'] = 'swiftgangliastats'
- headers['Host'] = 'upload.wikimedia.org'
- req = urllib2.Request('http://ms-fe.pmtpa.wmnet/auth/v1.0',
headers=headers)
+ req = urllib2.Request('http://localhost/auth/v1.0', headers=headers)
try:
resp = urllib2.urlopen(req)
except urllib2.HTTPError, e:
@@ -35,8 +34,7 @@
headers['X-Auth-Token'] = token
headers['X-Auth-User'] = username
headers['User-Agent'] = 'swiftgangliastats'
- # HEAD /v1/AUTH_xxdxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx HTTP/1.0 204 - -
mw%3Athumbnail%2CAUTH_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- url = 'http://ms-fe.pmtpa.wmnet/v1/%s' % authid
+ url = 'http://localhost/v1/%s' % authid
req = HEADRequest(url, headers=headers)
try:
resp = urllib2.urlopen(req)
@@ -86,7 +84,7 @@
# submits the metric to ganglia using gmetric, returns the exit code of gmetric
def submit_to_ganglia(name, value, units, valtype='int32',
- conf='/etc/ganglia/gmond.conf', spoof='Swift pmtpa prod:Swift
pmtpa prod'):
+ conf='/etc/ganglia/gmond.conf', spoof):
retcode = subprocess.call(['/usr/bin/gmetric', '--name', name, '--type',
valtype, '--conf', conf,
'--spoof', spoof, '--value', str(value), '--units', units])
return retcode
@@ -159,4 +157,4 @@
if __name__ == '__main__':
main()
-# vim: set nu list expandtab tabstop=4 shiftwidth=4 autoindent:
+# vim: set expandtab tabstop=4 shiftwidth=4 autoindent:
--
To view, visit https://gerrit.wikimedia.org/r/88056
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I207647b7bec510429978c540730c2a863d964cbe
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits