<h2>[ACC] Understanding the difference between Check Definition, Check Instance, and Check Type</h2><br/><div style="overflow-x:auto"><style type="text/css"><!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } </style><div class="ns-kb-css-body-editor-container"> <div class="ns-kb-css-body-editor-container"> <div class="mce-toc"> <h2>Table of Contents</h2> <ul><li><a href="#mcetoc_1jh9t2gqn42c">Overview</a></li><li><a href="#mcetoc_1jh9t2gqn42d">Check Definition</a></li><li><a href="#mcetoc_1jh9t2gqn42e">Check Instance</a></li><li><a href="#mcetoc_1jh9t2gqn42f">Check Type</a></li></ul> </div> <h1 id="mcetoc_1jh9t2gqn42c">Overview</h1> <div> <div>This article aims to explain the difference between Check Definitions, Check Instances, and Check Types. </div> <br /> <h1 id="mcetoc_1jh9t2gqn42d">Check Definition</h1> <br /> <div>Check Definition [sn_agent_check_def] is the base definition of a Check - like a blueprint that defines the command to execute and the default configuration options.</div> <div> </div> <div><a href="https://www.servicenow.com/docs/r/it-operations-management/agent-client-collector/check-definition-form.html">Check Definition form page</a></div> <br /> <div>- Command to execute</div> <div>- Name and description</div> <div>- Default scheduling information</div> <div>- Required configuration files and assets</div> <div>- Default Parameters</div> <br />Example: "Enhanced Discovery" Check Definition</div> <div> </div> <div>Please note: Check Definitions are used for on-demand check executions, such as UI Actions (e.g., Grab Agent Config), and are used as the default base when creating a new policy.</div> <div> </div> <div> <h1 id="mcetoc_1jh9t2gqn42e">Check Instance</h1> <br /> <div>Check Instance [sn_agent_check] is a configured instance of a Check with specific parameter values and settings, associated with a Monitoring Policy. </div> <div> </div> <div>Check Instances are created when defining Agent Client Collector Policies:</div> <div><a href="https://www.servicenow.com/docs/r/it-operations-management/agent-client-collector/create-edit-policies.html">Create a new Agent Client Collector policy</a></div> </div> <div> <div> </div> <div>A check instance Contains:</div> <div>- References to parent Check Definition, Monitoring Policy and Check Type</div> <div>- Specific parameter values (e.g., log_level=debug)</div> <div>- Customized scheduling (e.g., every 5 minutes instead of default 15)</div> <div>- May have a different name than the Check Definition</div> <div> </div> <br /> <div>Example: The "Enhanced Discovery Policy" policy contains an "Enhanced Discovery" check instance, which is a copy of the "Enhanced Discovery" check definition.</div> <div> </div> <div>Changes made to the check definition are not propagated automatically to the check instance - likewise, a configured check instance will not change the original check definition.</div> <div> </div> <div>Please note: </div> <div>If making changes to a check for testing or debugging purposes - such as to <a href="/kb?id=kb_article_view&sysparm_article=KB2723612" target="_blank" rel="noopener noreferrer">increase the log level of a check</a>, it is common to add a check instance to a test policy. However, not all checks should be tested via policy - many checks are designed only for on-demand execution. In this case, consider <a href="/kb?id=kb_article_view&sysparm_article=KB2723839">creating a copy</a> of the existing Check Definition so that existing functionality relying on the check definitions is not impacted (such as UI Actions, scheduled jobs). </div> <br /> <h1 id="mcetoc_1jh9t2gqn42f">Check Type</h1> <br />Check Type [sn_agent_check_type] defines how check results are processed after execution.</div> <div><br /> <div>Typically, the check type defines:</div> <div>- Instance-side processing scripts</div> <div>- MID Server processing scripts</div> <div> </div> <div>Note: Instance and MID scripts are optional and are not mutually exclusive. Most check types would use only a MID or Instance script, but this is not a strict requirement - some check types have neither, and some have both.</div> <br /> <div>Typically the Instance-side processing scripts describe the scripts used to process a check result on the instance - such as the discovery check payloads which are returned to the instance in the ECC Queue. Likewise, the MID Server processing scripts determine how a check result may be processed, such as the "Events" Check Type which is used to send events directly to the instance via the inbound event API (and therefore bypasses the ECC queue).</div> <br /> <div>Example: The "Enhanced Discovery" check definition uses "Enhanced Discovery" Check Type.</div> </div> <span id="ns-kb-css-end-div-identifier" style="display: none; pointer-events: none;"></span></div><span id="ns-kb-css-end-div-identifier" style="display: none; pointer-events: none;"></span></div></div>