Skip to content

Dedicated Zope service for Zenoss JSON API use

The zenapi service provides a Zope instance that is intended for requests sent through the Zenoss JSON API.

The Zenoss JSON API enables advanced users to customize Resource Manager and automate tasks such as adding and removing devices and managing events.

By default, the zenapi service starts when you launch Resource Manager and provides one Zope instance. If you need more than one dedicated instance, edit the zenapi service to increase the number, as described in Changing the number of Zope instances.

Under the following conditions, you can disable the service:

  • You have a small deployment or few concurrent users of the browser interface.
  • You infrequently use the Zenoss JSON API.

Disabling automatic start of the Zenoss JSON API Zope service

By default, the zenapi service starts when you launch Resource Manager. You can disable automatic start of the service.

  1. Log in to the Control Center master host as a user with Control Center CLI privileges.
  2. Disable automatic start of the zenapi service.

    1. Edit the configuration of the service.

      serviced service edit zenapi
      

      The command opens the service's configuration file in the default text editor.

    2. Locate the line "Launch": "auto", and replace "auto" with "manual" as follows:

      "Launch": "manual"
      
    3. Save the file, and then exit the text editor.

Stopping the Zenoss JSON API Zope service

You can disable use of the dedicated Zope service so that Resource Manager uses the general-purpose Zope instances for Zenoss JSON API processing.

  1. Log in to the Control Center browser interface.
  2. In the Applications table under Application, click the application name (Zenoss.resmgr).
  3. In the Public Endpoints table, locate zenapi URL, and under the Actions column, click Stop.
  4. Turn off rules that route Zenoss JSON API requests to the zenapi service:

    1. In the Configuration Files table, locate file zproxy-nginx.conf, and under the Actions column, click Edit.

    2. In the configuration file, locate the following line:

      ~*zenapi apizopes;
      
    3. Add the number sign character (#) to the beginning of the line.

      #~*zenapi apizopes;
      
    4. Click Save.

    5. In the Instances table under the Actions column, click Restart. This action restarts the zproxy service.
    6. Stop the zenapi service:
    7. In the Services table, click Zenoss.
    8. In the Services table, click User Interface.
    9. In the Services table, locate the zenapi service, and under the Actions column, click Stop.