{"action":"created","comment":{"url":"https://api.github.com/repos/firehol/netdata/pulls/comments/207724467","pull_request_review_id":143399027,"id":207724467,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNzcyNDQ2Nw==","diff_hunk":"@@ -0,0 +1,150 @@\n+# -*- coding: utf-8 -*-\n+# Description: monit netdata python.d module\n+# Author: Evgeniy K. (n0guest)\n+# SPDX-License-Identifier: GPL-3.0+\n+\n+import copy\n+import xml.etree.ElementTree as ET\n+from bases.FrameworkServices.UrlService import UrlService\n+\n+# default module values (can be overridden per job in `config`)\n+# update_every = 2\n+priority = 60000\n+retries = 60\n+\n+# see enum State_Type from monit.h (https://bitbucket.org/tildeslash/monit/src/master/src/monit.h)\n+MONIT_SERVICE_NAMES = [ 'Filesystem', 'Directory', 'File', 'Process', 'Host', 'System', 'Fifo', 'Program', 'Net' ]\n+DEFAULT_SERVICES_IDS = [ 0, 1, 2, 3, 4, 6, 7, 8 ]\n+\n+# charts order (can be overridden if you want less charts, or different order)\n+ORDER = [ 'filesystem', 'directory', 'file', 'process', 'process_uptime', 'process_threads', 'process_children', 'host', 'host_latency', 'system', 'fifo', 'program', 'net' ]\n+CHARTS = {\n+    # id: {\n+    #     'options': [name, title, units, family, context, charttype],\n+    #     'lines': [\n+    #         [unique_dimension_name, name, algorithm, multiplier, divisor]\n+    #     ]}\n+    'filesystem': {\n+        'options': ['filesystems', 'Filesystems', 'filesystems', 'filesystem', 'monit.filesystems', 'line'],\n+        'lines': []\n+    },\n+    'directory': {\n+        'options': ['directories', 'Directories', 'directories', 'filesystem', 'monit.directories', 'line'],\n+        'lines': []\n+    },\n+    'file': {\n+        'options': ['files', 'Files', 'files', 'filesystem', 'monit.files', 'line'],\n+        'lines': []\n+    },\n+    'fifo': {\n+        'options': ['fifos', 'Pipes (fifo)', 'pipes', 'filesystem', 'monit.fifos', 'line'],\n+        'lines': []\n+    },\n+    'program': {\n+        'options': ['programs', 'Programs statuses', 'programs', 'applications', 'monit.programs', 'line'],\n+        'lines': []\n+    },\n+    'process': {\n+        'options': ['processes', 'Processes statuses', 'processes', 'applications', 'monit.services', 'line'],\n+        'lines': []\n+    },\n+    'process_uptime': {\n+        'options': ['processes uptime', 'Processes uptime', 'seconds', 'applications', 'monit.process_uptime', 'line', 'hidden'],\n+        'lines': []\n+    },\n+    'process_threads': {\n+        'options': ['processes threads', 'Processes threads', 'threads', 'applications', 'monit.process_threads', 'line'],\n+        'lines': []\n+    },\n+    'process_children': {\n+        'options': ['processes childrens', 'Child processes', 'childrens', 'applications', 'monit.process_childrens', 'line'],\n+        'lines': []\n+    },\n+    'host': {\n+        'options': ['hosts', 'Hosts', 'hosts', 'network', 'monit.hosts', 'line'],\n+        'lines': []\n+    },\n+    'host_latency': {\n+        'options': ['hosts latency', 'Hosts latency', 'milliseconds/s', 'network', 'monit.host_latency', 'line'],\n+        'lines': []\n+    },\n+    'net': {\n+        'options': ['interfaces', 'Network interfaces and addresses', 'interfaces', 'network', 'monit.networks', 'line'],\n+        'lines': []\n+    },\n+}\n+\n+class Service(UrlService):\n+    def __init__(self, configuration=None, name=None):\n+        UrlService.__init__(self, configuration=configuration, name=name)\n+        self.url = self.configuration.get('url', \"http://127.0.0.1:2812/_status?format=xml&level=full\")","path":"python.d/monit.chart.py","position":null,"original_position":80,"commit_id":"1d82489dc2775d09fcbb2627a6366b77a19d4fd0","original_commit_id":"e7ae6bb3c838d0336f8e8667b30087f65a46e949","user":{"login":"l2isbad","id":22274335,"node_id":"MDQ6VXNlcjIyMjc0MzM1","avatar_url":"https://avatars3.githubusercontent.com/u/22274335?v=4","gravatar_id":"","url":"https://api.github.com/users/l2isbad","html_url":"https://github.com/l2isbad","followers_url":"https://api.github.com/users/l2isbad/followers","following_url":"https://api.github.com/users/l2isbad/following{/other_user}","gists_url":"https://api.github.com/users/l2isbad/gists{/gist_id}","starred_url":"https://api.github.com/users/l2isbad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/l2isbad/subscriptions","organizations_url":"https://api.github.com/users/l2isbad/orgs","repos_url":"https://api.github.com/users/l2isbad/repos","events_url":"https://api.github.com/users/l2isbad/events{/privacy}","received_events_url":"https://api.github.com/users/l2isbad/received_events","type":"User","site_admin":false},"body":"i believe `/_status` thing in `apache`, `nignx`, `hapoxy` is configurable, then it shouldn't be static.\r\n\r\nwhat about `monit`? does it always `_status?format=xml&level=full` ?\r\n","created_at":"2018-08-05T03:31:23Z","updated_at":"2018-08-05T03:31:23Z","html_url":"https://github.com/firehol/netdata/pull/4027#discussion_r207724467","pull_request_url":"https://api.github.com/repos/firehol/netdata/pulls/4027","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/firehol/netdata/pulls/comments/207724467"},"html":{"href":"https://github.com/firehol/netdata/pull/4027#discussion_r207724467"},"pull_request":{"href":"https://api.github.com/repos/firehol/netdata/pulls/4027"}},"in_reply_to_id":207536834},"pull_request":{"url":"https://api.github.com/repos/firehol/netdata/pulls/4027","id":205613750,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1NjEzNzUw","html_url":"https://github.com/firehol/netdata/pull/4027","diff_url":"https://github.com/firehol/netdata/pull/4027.diff","patch_url":"https://github.com/firehol/netdata/pull/4027.patch","issue_url":"https://api.github.com/repos/firehol/netdata/issues/4027","number":4027,"state":"open","locked":false,"title":"python plugin for monit (draft)","user":{"login":"n0guest","id":5829393,"node_id":"MDQ6VXNlcjU4MjkzOTM=","avatar_url":"https://avatars1.githubusercontent.com/u/5829393?v=4","gravatar_id":"","url":"https://api.github.com/users/n0guest","html_url":"https://github.com/n0guest","followers_url":"https://api.github.com/users/n0guest/followers","following_url":"https://api.github.com/users/n0guest/following{/other_user}","gists_url":"https://api.github.com/users/n0guest/gists{/gist_id}","starred_url":"https://api.github.com/users/n0guest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n0guest/subscriptions","organizations_url":"https://api.github.com/users/n0guest/orgs","repos_url":"https://api.github.com/users/n0guest/repos","events_url":"https://api.github.com/users/n0guest/events{/privacy}","received_events_url":"https://api.github.com/users/n0guest/received_events","type":"User","site_admin":false},"body":"Hello.\r\n\r\nHere is a draft version of python plugin for [Monit](https://mmonit.com/monit/). For now this plugin collects statuses of all checks (process/host/filesystem/etc) except [main system](https://mmonit.com/monit/documentation/monit.html#System). I.e. it's only metrics which aren't exists in Netdata already. Plus it exports few additional metrics for process/hosts checks. But to work correctly it depends on PR #4024 (by @l2isbad), because it uses hidden chart for \"processes uptime\".\r\n\r\nPlease, consider including it in upstream. If you have any notes on this code or there is something wrong - let me know and i'll fix.\r\n\r\nThank you.","created_at":"2018-08-02T04:13:36Z","updated_at":"2018-08-05T03:31:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7b7bb0ecc80886f2033db73a50ed8fa0c2b460e2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/firehol/netdata/pulls/4027/commits","review_comments_url":"https://api.github.com/repos/firehol/netdata/pulls/4027/comments","review_comment_url":"https://api.github.com/repos/firehol/netdata/pulls/comments{/number}","comments_url":"https://api.github.com/repos/firehol/netdata/issues/4027/comments","statuses_url":"https://api.github.com/repos/firehol/netdata/statuses/1d82489dc2775d09fcbb2627a6366b77a19d4fd0","head":{"label":"OSSHelp:python-monit-plugin","ref":"python-monit-plugin","sha":"1d82489dc2775d09fcbb2627a6366b77a19d4fd0","user":{"login":"OSSHelp","id":24411778,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0NDExNzc4","avatar_url":"https://avatars1.githubusercontent.com/u/24411778?v=4","gravatar_id":"","url":"https://api.github.com/users/OSSHelp","html_url":"https://github.com/OSSHelp","followers_url":"https://api.github.com/users/OSSHelp/followers","following_url":"https://api.github.com/users/OSSHelp/following{/other_user}","gists_url":"https://api.github.com/users/OSSHelp/gists{/gist_id}","starred_url":"https://api.github.com/users/OSSHelp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OSSHelp/subscriptions","organizations_url":"https://api.github.com/users/OSSHelp/orgs","repos_url":"https://api.github.com/users/OSSHelp/repos","events_url":"https://api.github.com/users/OSSHelp/events{/privacy}","received_events_url":"https://api.github.com/users/OSSHelp/received_events","type":"Organization","site_admin":false},"repo":{"id":143240006,"node_id":"MDEwOlJlcG9zaXRvcnkxNDMyNDAwMDY=","name":"netdata","full_name":"OSSHelp/netdata","owner":{"login":"OSSHelp","id":24411778,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0NDExNzc4","avatar_url":"https://avatars1.githubusercontent.com/u/24411778?v=4","gravatar_id":"","url":"https://api.github.com/users/OSSHelp","html_url":"https://github.com/OSSHelp","followers_url":"https://api.github.com/users/OSSHelp/followers","following_url":"https://api.github.com/users/OSSHelp/following{/other_user}","gists_url":"https://api.github.com/users/OSSHelp/gists{/gist_id}","starred_url":"https://api.github.com/users/OSSHelp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OSSHelp/subscriptions","organizations_url":"https://api.github.com/users/OSSHelp/orgs","repos_url":"https://api.github.com/users/OSSHelp/repos","events_url":"https://api.github.com/users/OSSHelp/events{/privacy}","received_events_url":"https://api.github.com/users/OSSHelp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OSSHelp/netdata","description":"Get control of your servers. Simple. Effective. Awesome! https://my-netdata.io/","fork":true,"url":"https://api.github.com/repos/OSSHelp/netdata","forks_url":"https://api.github.com/repos/OSSHelp/netdata/forks","keys_url":"https://api.github.com/repos/OSSHelp/netdata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OSSHelp/netdata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OSSHelp/netdata/teams","hooks_url":"https://api.github.com/repos/OSSHelp/netdata/hooks","issue_events_url":"https://api.github.com/repos/OSSHelp/netdata/issues/events{/number}","events_url":"https://api.github.com/repos/OSSHelp/netdata/events","assignees_url":"https://api.github.com/repos/OSSHelp/netdata/assignees{/user}","branches_url":"https://api.github.com/repos/OSSHelp/netdata/branches{/branch}","tags_url":"https://api.github.com/repos/OSSHelp/netdata/tags","blobs_url":"https://api.github.com/repos/OSSHelp/netdata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OSSHelp/netdata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OSSHelp/netdata/git/refs{/sha}","trees_url":"https://api.github.com/repos/OSSHelp/netdata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OSSHelp/netdata/statuses/{sha}","languages_url":"https://api.github.com/repos/OSSHelp/netdata/languages","stargazers_url":"https://api.github.com/repos/OSSHelp/netdata/stargazers","contributors_url":"https://api.github.com/repos/OSSHelp/netdata/contributors","subscribers_url":"https://api.github.com/repos/OSSHelp/netdata/subscribers","subscription_url":"https://api.github.com/repos/OSSHelp/netdata/subscription","commits_url":"https://api.github.com/repos/OSSHelp/netdata/commits{/sha}","git_commits_url":"https://api.github.com/repos/OSSHelp/netdata/git/commits{/sha}","comments_url":"https://api.github.com/repos/OSSHelp/netdata/comments{/number}","issue_comment_url":"https://api.github.com/repos/OSSHelp/netdata/issues/comments{/number}","contents_url":"https://api.github.com/repos/OSSHelp/netdata/contents/{+path}","compare_url":"https://api.github.com/repos/OSSHelp/netdata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OSSHelp/netdata/merges","archive_url":"https://api.github.com/repos/OSSHelp/netdata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OSSHelp/netdata/downloads","issues_url":"https://api.github.com/repos/OSSHelp/netdata/issues{/number}","pulls_url":"https://api.github.com/repos/OSSHelp/netdata/pulls{/number}","milestones_url":"https://api.github.com/repos/OSSHelp/netdata/milestones{/number}","notifications_url":"https://api.github.com/repos/OSSHelp/netdata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OSSHelp/netdata/labels{/name}","releases_url":"https://api.github.com/repos/OSSHelp/netdata/releases{/id}","deployments_url":"https://api.github.com/repos/OSSHelp/netdata/deployments","created_at":"2018-08-02T03:56:07Z","updated_at":"2018-08-02T03:56:12Z","pushed_at":"2018-08-05T03:08:07Z","git_url":"git://github.com/OSSHelp/netdata.git","ssh_url":"git@github.com:OSSHelp/netdata.git","clone_url":"https://github.com/OSSHelp/netdata.git","svn_url":"https://github.com/OSSHelp/netdata","homepage":"","size":24507,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"firehol:master","ref":"master","sha":"6832ce444d2637173a6bac436805ca9e55b84fc1","user":{"login":"firehol","id":9442231,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk0NDIyMzE=","avatar_url":"https://avatars2.githubusercontent.com/u/9442231?v=4","gravatar_id":"","url":"https://api.github.com/users/firehol","html_url":"https://github.com/firehol","followers_url":"https://api.github.com/users/firehol/followers","following_url":"https://api.github.com/users/firehol/following{/other_user}","gists_url":"https://api.github.com/users/firehol/gists{/gist_id}","starred_url":"https://api.github.com/users/firehol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firehol/subscriptions","organizations_url":"https://api.github.com/users/firehol/orgs","repos_url":"https://api.github.com/users/firehol/repos","events_url":"https://api.github.com/users/firehol/events{/privacy}","received_events_url":"https://api.github.com/users/firehol/received_events","type":"Organization","site_admin":false},"repo":{"id":10744183,"node_id":"MDEwOlJlcG9zaXRvcnkxMDc0NDE4Mw==","name":"netdata","full_name":"firehol/netdata","owner":{"login":"firehol","id":9442231,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk0NDIyMzE=","avatar_url":"https://avatars2.githubusercontent.com/u/9442231?v=4","gravatar_id":"","url":"https://api.github.com/users/firehol","html_url":"https://github.com/firehol","followers_url":"https://api.github.com/users/firehol/followers","following_url":"https://api.github.com/users/firehol/following{/other_user}","gists_url":"https://api.github.com/users/firehol/gists{/gist_id}","starred_url":"https://api.github.com/users/firehol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firehol/subscriptions","organizations_url":"https://api.github.com/users/firehol/orgs","repos_url":"https://api.github.com/users/firehol/repos","events_url":"https://api.github.com/users/firehol/events{/privacy}","received_events_url":"https://api.github.com/users/firehol/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/firehol/netdata","description":"Get control of your servers. Simple. Effective. Awesome! https://my-netdata.io/","fork":false,"url":"https://api.github.com/repos/firehol/netdata","forks_url":"https://api.github.com/repos/firehol/netdata/forks","keys_url":"https://api.github.com/repos/firehol/netdata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/firehol/netdata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/firehol/netdata/teams","hooks_url":"https://api.github.com/repos/firehol/netdata/hooks","issue_events_url":"https://api.github.com/repos/firehol/netdata/issues/events{/number}","events_url":"https://api.github.com/repos/firehol/netdata/events","assignees_url":"https://api.github.com/repos/firehol/netdata/assignees{/user}","branches_url":"https://api.github.com/repos/firehol/netdata/branches{/branch}","tags_url":"https://api.github.com/repos/firehol/netdata/tags","blobs_url":"https://api.github.com/repos/firehol/netdata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/firehol/netdata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/firehol/netdata/git/refs{/sha}","trees_url":"https://api.github.com/repos/firehol/netdata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/firehol/netdata/statuses/{sha}","languages_url":"https://api.github.com/repos/firehol/netdata/languages","stargazers_url":"https://api.github.com/repos/firehol/netdata/stargazers","contributors_url":"https://api.github.com/repos/firehol/netdata/contributors","subscribers_url":"https://api.github.com/repos/firehol/netdata/subscribers","subscription_url":"https://api.github.com/repos/firehol/netdata/subscription","commits_url":"https://api.github.com/repos/firehol/netdata/commits{/sha}","git_commits_url":"https://api.github.com/repos/firehol/netdata/git/commits{/sha}","comments_url":"https://api.github.com/repos/firehol/netdata/comments{/number}","issue_comment_url":"https://api.github.com/repos/firehol/netdata/issues/comments{/number}","contents_url":"https://api.github.com/repos/firehol/netdata/contents/{+path}","compare_url":"https://api.github.com/repos/firehol/netdata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/firehol/netdata/merges","archive_url":"https://api.github.com/repos/firehol/netdata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/firehol/netdata/downloads","issues_url":"https://api.github.com/repos/firehol/netdata/issues{/number}","pulls_url":"https://api.github.com/repos/firehol/netdata/pulls{/number}","milestones_url":"https://api.github.com/repos/firehol/netdata/milestones{/number}","notifications_url":"https://api.github.com/repos/firehol/netdata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/firehol/netdata/labels{/name}","releases_url":"https://api.github.com/repos/firehol/netdata/releases{/id}","deployments_url":"https://api.github.com/repos/firehol/netdata/deployments","created_at":"2013-06-17T18:39:10Z","updated_at":"2018-08-05T03:22:04Z","pushed_at":"2018-08-05T03:08:12Z","git_url":"git://github.com/firehol/netdata.git","ssh_url":"git@github.com:firehol/netdata.git","clone_url":"https://github.com/firehol/netdata.git","svn_url":"https://github.com/firehol/netdata","homepage":"","size":24473,"stargazers_count":30884,"watchers_count":30884,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2635,"mirror_url":null,"archived":false,"open_issues_count":489,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":2635,"open_issues":489,"watchers":30884,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/firehol/netdata/pulls/4027"},"html":{"href":"https://github.com/firehol/netdata/pull/4027"},"issue":{"href":"https://api.github.com/repos/firehol/netdata/issues/4027"},"comments":{"href":"https://api.github.com/repos/firehol/netdata/issues/4027/comments"},"review_comments":{"href":"https://api.github.com/repos/firehol/netdata/pulls/4027/comments"},"review_comment":{"href":"https://api.github.com/repos/firehol/netdata/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/firehol/netdata/pulls/4027/commits"},"statuses":{"href":"https://api.github.com/repos/firehol/netdata/statuses/1d82489dc2775d09fcbb2627a6366b77a19d4fd0"}},"author_association":"NONE"}}
{"actor":{"display_login":"l2isbad"}}