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.
- Log in to the Control Center master host as a user with Control Center CLI privileges.
-
Disable automatic start of the zenapi service.
-
Edit the configuration of the service.
serviced service edit zenapi
The command opens the service's configuration file in the default text editor.
-
Locate the line "Launch": "auto", and replace "auto" with "manual" as follows:
"Launch": "manual"
-
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.
- Log in to the Control Center browser interface.
- In the Applications table under Application, click the application name (Zenoss.resmgr).
- In the Public Endpoints table, locate zenapi URL, and under the Actions column, click Stop.
-
Turn off rules that route Zenoss JSON API requests to the zenapi service:
-
In the Configuration Files table, locate file zproxy-nginx.conf, and under the Actions column, click Edit.
-
In the configuration file, locate the following line:
~*zenapi apizopes;
-
Add the number sign character (#) to the beginning of the line.
#~*zenapi apizopes;
-
Click Save.
- In the Instances table under the Actions column, click Restart. This action restarts the zproxy service.
- Stop the zenapi service:
- In the Services table, click Zenoss.
- In the Services table, click User Interface.
- In the Services table, locate the zenapi service, and under the Actions column, click Stop.
-