Re:Show HN: Cloudmarker – Cloud monitoring tool and framework
by msnut on Monday May 13, 2019 @12:07PM
(#19900677)
I am trying this tool. First impression: The plugin framework works like charm. Creating a small plugin to get GitHub org repo info. Working with only two files. Plugin is one file and configuration yaml is other file.
I am not Python developer. I develop in Powershell. So don't judge my code. :)
I put this in ghcloud.py.
import urllib.request
import json
class GhCloud:
def __init__(self, org):
self.org = org
def read(self):
url = 'https://api.github.com/orgs/%s/repos' % self.org
data = json.loads(urllib.request.urlopen(url).read().decode('utf-8'))
for d in data: yield d
def done(self):
pass
Cloudmarker runs my ghcloud.py and puts data into localhost:9200 and /tmp automatically. I can do it without cloning Cloudmarker code. I only hack my code and Cloudmarker runs it.
I am not Python developer. I develop in Powershell. So don't judge my code. :)
I put this in ghcloud.py.
I put this in cloudmarker.yaml. I run tool. Cloudmarker runs my ghcloud.py and puts data into localhost:9200 and /tmp automatically. I can do it without cloning Cloudmarker code. I only hack my code and Cloudmarker runs it.