payload: {"action":"created","comment":{"url":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/comments/314837185","pull_request_review_id":276100256,"id":314837185,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMxNDgzNzE4NQ==","diff_hunk":"@@ -7,201 +7,325 @@\n \n # # imports\n import os\n+import time\n+import datetime\n+import socket\n # # from DIRAC\n from DIRAC import S_OK, S_ERROR, gLogger\n from DIRAC.FrameworkSystem.Client.MonitoringClient import gMonitor\n-from DIRAC.DataManagementSystem.Agent.RequestOperations.DMSRequestOperationsBase  import DMSRequestOperationsBase\n-from DIRAC.DataManagementSystem.Client.ConsistencyInspector                       import ConsistencyInspector\n+from DIRAC.DataManagementSystem.Agent.RequestOperations.DMSRequestOperationsBase import DMSRequestOperationsBase\n+from DIRAC.DataManagementSystem.Client.ConsistencyInspector import ConsistencyInspector\n+\n+from DIRAC.MonitoringSystem.Client.MonitoringReporter import MonitoringReporter\n+from DIRAC.ConfigurationSystem.Client.Helpers.Operations import Operations\n \n ####\n-class MoveReplica( DMSRequestOperationsBase ):\n+\n+\n+class MoveReplica(DMSRequestOperationsBase):\n   \"\"\"\n   .. class:: MoveReplica\n \n   MoveReplica operation handler\n   \"\"\"\n \n-  def __init__( self, operation = None, csPath = None ):\n+  def __init__(self, operation=None, csPath=None):\n     \"\"\"c'tor\n \n     :param self: self reference\n     :param ~Operation.Operation operation: Operation instance\n     :param str csPath: CS path for this handler\n     \"\"\"\n-    super( MoveReplica, self ).__init__( operation, csPath )\n-    # # own gMonitor stuff for files\n-    gMonitor.registerActivity( \"ReplicateAndRegisterAtt\", \"Replicate and register attempted\",\n-                               \"RequestExecutingAgent\", \"Files/min\", gMonitor.OP_SUM )\n-    gMonitor.registerActivity( \"ReplicateOK\", \"Replications successful\",\n-                               \"RequestExecutingAgent\", \"Files/min\", gMonitor.OP_SUM )\n-    gMonitor.registerActivity( \"ReplicateFail\", \"Replications failed\",\n-                               \"RequestExecutingAgent\", \"Files/min\", gMonitor.OP_SUM )\n-    gMonitor.registerActivity( \"RegisterOK\", \"Registrations successful\",\n-                               \"RequestExecutingAgent\", \"Files/min\", gMonitor.OP_SUM )\n-    gMonitor.registerActivity( \"RegisterFail\", \"Registrations failed\",\n-                               \"RequestExecutingAgent\", \"Files/min\", gMonitor.OP_SUM )\n-    gMonitor.registerActivity( \"RemoveReplicaAtt\", \"Replica removals attempted\",\n-                               \"RequestExecutingAgent\", \"Files/min\", gMonitor.OP_SUM )\n-    gMonitor.registerActivity( \"RemoveReplicaOK\", \"Successful replica removals\",\n-                               \"RequestExecutingAgent\", \"Files/min\", gMonitor.OP_SUM )\n-    gMonitor.registerActivity( \"RemoveReplicaFail\", \"Failed replica removals\",\n-                               \"RequestExecutingAgent\", \"Files/min\", gMonitor.OP_SUM )\n+    super(MoveReplica, self).__init__(operation, csPath)\n+\n+    # Check whether the ES flag is enabled so we can send the data accordingly.\n+    self.rmsMonitoring = Operations().getValue(\"EnableActivityMonitoring\", False)","path":"DataManagementSystem/Agent/RequestOperations/MoveReplica.py","position":null,"original_position":58,"commit_id":"b50ea3f28491871cfea881eb39ad32593658d1db","original_commit_id":"72aba9023cc54361a5e158395736587a0a518ad3","user":{"login":"pujanm","id":26873907,"node_id":"MDQ6VXNlcjI2ODczOTA3","avatar_url":"https://avatars1.githubusercontent.com/u/26873907?v=4","gravatar_id":"","url":"https://api.github.com/users/pujanm","html_url":"https://github.com/pujanm","followers_url":"https://api.github.com/users/pujanm/followers","following_url":"https://api.github.com/users/pujanm/following{/other_user}","gists_url":"https://api.github.com/users/pujanm/gists{/gist_id}","starred_url":"https://api.github.com/users/pujanm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pujanm/subscriptions","organizations_url":"https://api.github.com/users/pujanm/orgs","repos_url":"https://api.github.com/users/pujanm/repos","events_url":"https://api.github.com/users/pujanm/events{/privacy}","received_events_url":"https://api.github.com/users/pujanm/received_events","type":"User","site_admin":false},"body":"Solved this problem.","created_at":"2019-08-16T18:21:32Z","updated_at":"2019-08-16T18:21:32Z","html_url":"https://github.com/DIRACGrid/DIRAC/pull/4209#discussion_r314837185","pull_request_url":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/4209","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/comments/314837185"},"html":{"href":"https://github.com/DIRACGrid/DIRAC/pull/4209#discussion_r314837185"},"pull_request":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/4209"}},"in_reply_to_id":314664603},"pull_request":{"url":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/4209","id":305510896,"node_id":"MDExOlB1bGxSZXF1ZXN0MzA1NTEwODk2","html_url":"https://github.com/DIRACGrid/DIRAC/pull/4209","diff_url":"https://github.com/DIRACGrid/DIRAC/pull/4209.diff","patch_url":"https://github.com/DIRACGrid/DIRAC/pull/4209.patch","issue_url":"https://api.github.com/repos/DIRACGrid/DIRAC/issues/4209","number":4209,"state":"open","locked":false,"title":"[WIP][integration] Add ES Monitoring support to RequestManagementSystem and DataManagementSystem/Agent/RequestOperations/","user":{"login":"pujanm","id":26873907,"node_id":"MDQ6VXNlcjI2ODczOTA3","avatar_url":"https://avatars1.githubusercontent.com/u/26873907?v=4","gravatar_id":"","url":"https://api.github.com/users/pujanm","html_url":"https://github.com/pujanm","followers_url":"https://api.github.com/users/pujanm/followers","following_url":"https://api.github.com/users/pujanm/following{/other_user}","gists_url":"https://api.github.com/users/pujanm/gists{/gist_id}","starred_url":"https://api.github.com/users/pujanm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pujanm/subscriptions","organizations_url":"https://api.github.com/users/pujanm/orgs","repos_url":"https://api.github.com/users/pujanm/repos","events_url":"https://api.github.com/users/pujanm/events{/privacy}","received_events_url":"https://api.github.com/users/pujanm/received_events","type":"User","site_admin":false},"body":"\r\nBEGINRELEASENOTES\r\n\r\nNEW: Extends the MonitoringSystem to support RMS and DMS/Agents/RequestOperations.\r\n\r\nENDRELEASENOTES\r\n","created_at":"2019-08-08T10:27:46Z","updated_at":"2019-08-16T18:21:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5d6609a6e3d6546ee3085b848c6b12a6113b30e5","assignee":null,"assignees":[],"requested_reviewers":[{"login":"chaen","id":3728211,"node_id":"MDQ6VXNlcjM3MjgyMTE=","avatar_url":"https://avatars0.githubusercontent.com/u/3728211?v=4","gravatar_id":"","url":"https://api.github.com/users/chaen","html_url":"https://github.com/chaen","followers_url":"https://api.github.com/users/chaen/followers","following_url":"https://api.github.com/users/chaen/following{/other_user}","gists_url":"https://api.github.com/users/chaen/gists{/gist_id}","starred_url":"https://api.github.com/users/chaen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chaen/subscriptions","organizations_url":"https://api.github.com/users/chaen/orgs","repos_url":"https://api.github.com/users/chaen/repos","events_url":"https://api.github.com/users/chaen/events{/privacy}","received_events_url":"https://api.github.com/users/chaen/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/4209/commits","review_comments_url":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/4209/comments","review_comment_url":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DIRACGrid/DIRAC/issues/4209/comments","statuses_url":"https://api.github.com/repos/DIRACGrid/DIRAC/statuses/b50ea3f28491871cfea881eb39ad32593658d1db","head":{"label":"pujanm:integration_monitor-systems","ref":"integration_monitor-systems","sha":"b50ea3f28491871cfea881eb39ad32593658d1db","user":{"login":"pujanm","id":26873907,"node_id":"MDQ6VXNlcjI2ODczOTA3","avatar_url":"https://avatars1.githubusercontent.com/u/26873907?v=4","gravatar_id":"","url":"https://api.github.com/users/pujanm","html_url":"https://github.com/pujanm","followers_url":"https://api.github.com/users/pujanm/followers","following_url":"https://api.github.com/users/pujanm/following{/other_user}","gists_url":"https://api.github.com/users/pujanm/gists{/gist_id}","starred_url":"https://api.github.com/users/pujanm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pujanm/subscriptions","organizations_url":"https://api.github.com/users/pujanm/orgs","repos_url":"https://api.github.com/users/pujanm/repos","events_url":"https://api.github.com/users/pujanm/events{/privacy}","received_events_url":"https://api.github.com/users/pujanm/received_events","type":"User","site_admin":false},"repo":{"id":188240183,"node_id":"MDEwOlJlcG9zaXRvcnkxODgyNDAxODM=","name":"DIRAC","full_name":"pujanm/DIRAC","private":false,"owner":{"login":"pujanm","id":26873907,"node_id":"MDQ6VXNlcjI2ODczOTA3","avatar_url":"https://avatars1.githubusercontent.com/u/26873907?v=4","gravatar_id":"","url":"https://api.github.com/users/pujanm","html_url":"https://github.com/pujanm","followers_url":"https://api.github.com/users/pujanm/followers","following_url":"https://api.github.com/users/pujanm/following{/other_user}","gists_url":"https://api.github.com/users/pujanm/gists{/gist_id}","starred_url":"https://api.github.com/users/pujanm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pujanm/subscriptions","organizations_url":"https://api.github.com/users/pujanm/orgs","repos_url":"https://api.github.com/users/pujanm/repos","events_url":"https://api.github.com/users/pujanm/events{/privacy}","received_events_url":"https://api.github.com/users/pujanm/received_events","type":"User","site_admin":false},"html_url":"https://github.com/pujanm/DIRAC","description":"DIRAC Grid","fork":true,"url":"https://api.github.com/repos/pujanm/DIRAC","forks_url":"https://api.github.com/repos/pujanm/DIRAC/forks","keys_url":"https://api.github.com/repos/pujanm/DIRAC/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pujanm/DIRAC/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pujanm/DIRAC/teams","hooks_url":"https://api.github.com/repos/pujanm/DIRAC/hooks","issue_events_url":"https://api.github.com/repos/pujanm/DIRAC/issues/events{/number}","events_url":"https://api.github.com/repos/pujanm/DIRAC/events","assignees_url":"https://api.github.com/repos/pujanm/DIRAC/assignees{/user}","branches_url":"https://api.github.com/repos/pujanm/DIRAC/branches{/branch}","tags_url":"https://api.github.com/repos/pujanm/DIRAC/tags","blobs_url":"https://api.github.com/repos/pujanm/DIRAC/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pujanm/DIRAC/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pujanm/DIRAC/git/refs{/sha}","trees_url":"https://api.github.com/repos/pujanm/DIRAC/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pujanm/DIRAC/statuses/{sha}","languages_url":"https://api.github.com/repos/pujanm/DIRAC/languages","stargazers_url":"https://api.github.com/repos/pujanm/DIRAC/stargazers","contributors_url":"https://api.github.com/repos/pujanm/DIRAC/contributors","subscribers_url":"https://api.github.com/repos/pujanm/DIRAC/subscribers","subscription_url":"https://api.github.com/repos/pujanm/DIRAC/subscription","commits_url":"https://api.github.com/repos/pujanm/DIRAC/commits{/sha}","git_commits_url":"https://api.github.com/repos/pujanm/DIRAC/git/commits{/sha}","comments_url":"https://api.github.com/repos/pujanm/DIRAC/comments{/number}","issue_comment_url":"https://api.github.com/repos/pujanm/DIRAC/issues/comments{/number}","contents_url":"https://api.github.com/repos/pujanm/DIRAC/contents/{+path}","compare_url":"https://api.github.com/repos/pujanm/DIRAC/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pujanm/DIRAC/merges","archive_url":"https://api.github.com/repos/pujanm/DIRAC/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pujanm/DIRAC/downloads","issues_url":"https://api.github.com/repos/pujanm/DIRAC/issues{/number}","pulls_url":"https://api.github.com/repos/pujanm/DIRAC/pulls{/number}","milestones_url":"https://api.github.com/repos/pujanm/DIRAC/milestones{/number}","notifications_url":"https://api.github.com/repos/pujanm/DIRAC/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pujanm/DIRAC/labels{/name}","releases_url":"https://api.github.com/repos/pujanm/DIRAC/releases{/id}","deployments_url":"https://api.github.com/repos/pujanm/DIRAC/deployments","created_at":"2019-05-23T13:31:27Z","updated_at":"2019-08-15T05:58:05Z","pushed_at":"2019-08-16T18:05:47Z","git_url":"git://github.com/pujanm/DIRAC.git","ssh_url":"git@github.com:pujanm/DIRAC.git","clone_url":"https://github.com/pujanm/DIRAC.git","svn_url":"https://github.com/pujanm/DIRAC","homepage":"http://diracgrid.org","size":55308,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":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":"integration"}},"base":{"label":"DIRACGrid:integration","ref":"integration","sha":"a1e3280cf24f841be93177516d0b8f9920c37e1f","user":{"login":"DIRACGrid","id":694842,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5NDg0Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/694842?v=4","gravatar_id":"","url":"https://api.github.com/users/DIRACGrid","html_url":"https://github.com/DIRACGrid","followers_url":"https://api.github.com/users/DIRACGrid/followers","following_url":"https://api.github.com/users/DIRACGrid/following{/other_user}","gists_url":"https://api.github.com/users/DIRACGrid/gists{/gist_id}","starred_url":"https://api.github.com/users/DIRACGrid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DIRACGrid/subscriptions","organizations_url":"https://api.github.com/users/DIRACGrid/orgs","repos_url":"https://api.github.com/users/DIRACGrid/repos","events_url":"https://api.github.com/users/DIRACGrid/events{/privacy}","received_events_url":"https://api.github.com/users/DIRACGrid/received_events","type":"Organization","site_admin":false},"repo":{"id":1576831,"node_id":"MDEwOlJlcG9zaXRvcnkxNTc2ODMx","name":"DIRAC","full_name":"DIRACGrid/DIRAC","private":false,"owner":{"login":"DIRACGrid","id":694842,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5NDg0Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/694842?v=4","gravatar_id":"","url":"https://api.github.com/users/DIRACGrid","html_url":"https://github.com/DIRACGrid","followers_url":"https://api.github.com/users/DIRACGrid/followers","following_url":"https://api.github.com/users/DIRACGrid/following{/other_user}","gists_url":"https://api.github.com/users/DIRACGrid/gists{/gist_id}","starred_url":"https://api.github.com/users/DIRACGrid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DIRACGrid/subscriptions","organizations_url":"https://api.github.com/users/DIRACGrid/orgs","repos_url":"https://api.github.com/users/DIRACGrid/repos","events_url":"https://api.github.com/users/DIRACGrid/events{/privacy}","received_events_url":"https://api.github.com/users/DIRACGrid/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/DIRACGrid/DIRAC","description":"DIRAC Grid","fork":false,"url":"https://api.github.com/repos/DIRACGrid/DIRAC","forks_url":"https://api.github.com/repos/DIRACGrid/DIRAC/forks","keys_url":"https://api.github.com/repos/DIRACGrid/DIRAC/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DIRACGrid/DIRAC/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DIRACGrid/DIRAC/teams","hooks_url":"https://api.github.com/repos/DIRACGrid/DIRAC/hooks","issue_events_url":"https://api.github.com/repos/DIRACGrid/DIRAC/issues/events{/number}","events_url":"https://api.github.com/repos/DIRACGrid/DIRAC/events","assignees_url":"https://api.github.com/repos/DIRACGrid/DIRAC/assignees{/user}","branches_url":"https://api.github.com/repos/DIRACGrid/DIRAC/branches{/branch}","tags_url":"https://api.github.com/repos/DIRACGrid/DIRAC/tags","blobs_url":"https://api.github.com/repos/DIRACGrid/DIRAC/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DIRACGrid/DIRAC/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DIRACGrid/DIRAC/git/refs{/sha}","trees_url":"https://api.github.com/repos/DIRACGrid/DIRAC/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DIRACGrid/DIRAC/statuses/{sha}","languages_url":"https://api.github.com/repos/DIRACGrid/DIRAC/languages","stargazers_url":"https://api.github.com/repos/DIRACGrid/DIRAC/stargazers","contributors_url":"https://api.github.com/repos/DIRACGrid/DIRAC/contributors","subscribers_url":"https://api.github.com/repos/DIRACGrid/DIRAC/subscribers","subscription_url":"https://api.github.com/repos/DIRACGrid/DIRAC/subscription","commits_url":"https://api.github.com/repos/DIRACGrid/DIRAC/commits{/sha}","git_commits_url":"https://api.github.com/repos/DIRACGrid/DIRAC/git/commits{/sha}","comments_url":"https://api.github.com/repos/DIRACGrid/DIRAC/comments{/number}","issue_comment_url":"https://api.github.com/repos/DIRACGrid/DIRAC/issues/comments{/number}","contents_url":"https://api.github.com/repos/DIRACGrid/DIRAC/contents/{+path}","compare_url":"https://api.github.com/repos/DIRACGrid/DIRAC/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DIRACGrid/DIRAC/merges","archive_url":"https://api.github.com/repos/DIRACGrid/DIRAC/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DIRACGrid/DIRAC/downloads","issues_url":"https://api.github.com/repos/DIRACGrid/DIRAC/issues{/number}","pulls_url":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls{/number}","milestones_url":"https://api.github.com/repos/DIRACGrid/DIRAC/milestones{/number}","notifications_url":"https://api.github.com/repos/DIRACGrid/DIRAC/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DIRACGrid/DIRAC/labels{/name}","releases_url":"https://api.github.com/repos/DIRACGrid/DIRAC/releases{/id}","deployments_url":"https://api.github.com/repos/DIRACGrid/DIRAC/deployments","created_at":"2011-04-06T11:47:53Z","updated_at":"2019-08-14T20:03:06Z","pushed_at":"2019-08-16T18:05:49Z","git_url":"git://github.com/DIRACGrid/DIRAC.git","ssh_url":"git@github.com:DIRACGrid/DIRAC.git","clone_url":"https://github.com/DIRACGrid/DIRAC.git","svn_url":"https://github.com/DIRACGrid/DIRAC","homepage":"http://diracgrid.org","size":54480,"stargazers_count":79,"watchers_count":79,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":134,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":104,"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":134,"open_issues":104,"watchers":79,"default_branch":"integration"}},"_links":{"self":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/4209"},"html":{"href":"https://github.com/DIRACGrid/DIRAC/pull/4209"},"issue":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/issues/4209"},"comments":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/issues/4209/comments"},"review_comments":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/4209/comments"},"review_comment":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/4209/commits"},"statuses":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/statuses/b50ea3f28491871cfea881eb39ad32593658d1db"}},"author_association":"CONTRIBUTOR"}}
other: {"actor":{"display_login":"pujanm"}}