{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":31219,"path":"it-operations-management/metric-intelligence/disable-event-collection.md","title":"Disable event collection","bundle":null,"doc_type":null,"release":"australia","body":"\n# Disable event collection\n\nFor performance reasons, you might want to disable the collection of events from a data source from which metric data is also collected. You can disable event collection for data sources such as Nagios XI server, SolarWinds monitoring system, and Zabbix server.\n\n## Before you begin\n\nRole required: evt\\_mgmt\\_admin\n\n**Note:** To restart event collection after it has been disabled, you will need to restore the connector's original script.\n\n## Procedure\n\n1.  Navigate to **All** &gt; **Event Management** &gt; **Integrations** &gt; **Connector Instances**.\n\n2.  Select a connector instance for the data source for which to disable event collection.\n\n    For example, select a connector instance for Nagios, SolarWinds, or Zabbix.\n\n3.  Set **Event collection schedule \\(seconds\\)** to a large value such as 20,000,000.\n\n    Such setting avoids unnecessary communication with the MID Server, optimizing performance.\n\n4.  Click **Update**.\n\n5.  Navigate to **MID Server** &gt; **Script Includes** and extend the connector's script \\(such as **NagiosMetrics\\_JS**, **SolarWindsJS**, or **ZabbixJS**\\) by overriding the **execute** method.\n\n    Add a code snippet such as the following, and then click **Update**:\n\n\n## Snippet for Nagios\n\n```\nvar NagiosJSCustom = Class.create();\n \n// Extending Nagios default script\nNagiosJSCustom.prototype = Object.extendsObject(NagiosJS, {\n \n// Override execute method\n                    execute: function() {\n        var retVal = {};                                            \n        retVal['status'] = SUCCESS.toString();\n       retVal['error_message'] = \"Disabled by custom Class, 'Last event collection status' will be 'error' and this is normal. To achieve success status, enable event pull in custom class(NagiosJSCustom)\";\n                                               \n        return retVal;\n    });\n```\n\nFor the SolarWinds connector use:\n\n```\nvar SolarWindsJSCustom = Class.create();\n \n// Extending solarwinds default script\nSolarWindsJSCustom.prototype = Object.extendsObject(SolarWindsJS, {\n```\n\nFor the Zabbix connector use:\n\n```\nvar ZabbixJSCustom = Class.create();\n \n// Extending zabbix default script\nZabbixJSCustom.prototype = Object.extendsObject(ZabbixJS, {\n```\n\n**Parent Topic:**[Optimizing Metric Intelligence](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-operations-management/metric-intelligence/optimizing-metric-intelligence.md)\n\n"}}