# Generic Services

If you need to monitor a SaaS solution that has no dedicated integration, you can do so by creating and configuring a Generic Service in Avantra.

## Creating Generic Services

To create a Generic Service:

1. Select Systems Cloud Services from the top menu.

   The list of existing services is shown in the table.

2. Click New.

   The New Cloud Service dialog opens.

3. In the dialog, fill in the following fields (all fields are mandatory):

   - Service Type - select Generic Service

   - Service - enter the name for the new monitored cloud service

   - Customer - select the customer to which the service will be available

   - System Role - select a system role which users will have access to the service

4. Click New.

   The service is created and is shown in the Services table. The cloud icon by the service’s name is grey since the service is not configured and its status is UNKNOWN to the system.

   Now you need to configure the service.

5. Double-click your service (alternatively, select your service in the table and click Open in the toolbar).

   The detailed view of the service is displayed with the Properties tab displayed by default. Most of the properties here are self-explanatory, we will only focus on the properties vital for the service monitoring.

6. In the Cloud Service Info section, select the Monitoring Server from the drop-down list. You can also configure a proxy for the agent while adding a new Cloud Service.

7. In the URL field, enter the URL of the SaaS solution.

8. If you want to assign certain users to be responsible for this service, you may select the corresponding values for the Administrator and Administrator’s Deputy fields in the Responsibilities block.

9. In the toolbar, click Apply.

   The system will try to connect to the service, and if successful, the service’s icon will turn green. The system also automatically creates the SO_Connect Check which can be seen in the Checks tab.

Now you can associate Custom Checks working with the service’s API to start monitoring the aspects you are interested in.

## Assigning Custom Checks

To work with the SaaS solution’s API, you need to create a new Custom Check based on the RUN_JS Custom Check type. For detailed information about the RUN_JS Custom Checks, refer to RUN_JS. In this section, we will cover the basic process of creating the RUN_JS Custom Check and associating it with our service.

To create a RUN_JS Custom Check:

1. Select Configuration Custom Checks.

2. In the toolbar, click New.

   The Create Custom Check dialog opens.

3. Scroll down to the Cloud Services option and click RUN_JS in the right pane.

4. The creation options are displayed at the bottom of the dialog. Enter the Custom Check Name, select a Customer and leave the System Type at the Cloud Service option.

5. Click Create.

   The Custom Check is successfully created and is now available in the table. Its Properties tab is displayed - this is where you associate the Check with the Service and specify what exactly the Check should monitor.

6. In the Systems section, select what system the Check is to be associated with:

   - Select a Pre-Defined System Selector - if you have already created a System Selector, you can select it from the drop-down list.

   - Define specific 'Ad-Hoc' Custom Selection - opens a System Selector creation dialog, where you can create a new selector or import an existing one.

7. In the Specific section, enter the Java Script to fetch the required information from the SaaS solution.

8. In the toolbar, click Apply and activate the Check.

   Now your check is configured and associated with your Cloud Service. You can find it in the service’s Checks tab.