You can take checks from the github community and customize them for use in the Agent Client Collector (ACC), or you can compose your own scripts. Create a
plugin with the customized Sensu check and install it on a ServiceNow
instance.
Before you begin
Role required: agent_client_collector_admin
Procedure
-
Copy a check from the github community to your local machine.
-
Create a tar.gz file to be appended to your plugin:
-
Create a folder on your local machine.
-
Create a sub-folder called bin.
-
Place the checks you want to run (scripts and executables) in the
bin folder.
-
In a Linux environment, give executable permissions to the checks by
running chmod +x filename on each of the
checks.
-
Navigate to the parent folder (above the bin folder).
-
In a Linux environment, run the tar -C <parent_folder_name>
--zcvf <my_plugin_name>.tar.gz * command.
In a Windows environment, use an archiving utility that supports the
tar.gz format.
-
In a Windows environment, ensure that you include the following scripts
in the bin folder:
-
Create a new ACC plugin, as described in Create and edit Agent Client Collector plugins.
-
Test the new plugin.
-
Create a new check definition for the customized Sensu check.
-
On the Check Definition page, navigate to the
Related Links section and select
Generate allow list content.
-
Copy the entries you want to include in the allow list and add them to the agent's check-allow-list.json file, either manually or using an automation tool.
The location of this file is indicated in the allow-list parameter of the agent's acc.yml file.
-
Create a new policy and add the newly created check definition.
-
Select the check definition and in the Related
Links section, select Test
check.
-
Enable credentials when testing a check:
-
Navigate to .
-
Click New.
-
Select the type of credentials you want to create.
-
Enter values in the fields on the page to assign credentials to your selected credential type.
-
Click Submit.
-
Create secure parameters for your check, as described in Create secure parameters for a check.