How does eG Enterprise Monitor OpenAI?
eG Enterprise monitors OpenAI in an agentless manner using an eG remote agent deployed on any Windows/Linux host or VM in the environment. The eG agent makes REST API calls to OpenAI services to collect metrics related to the availability, responsiveness, and usage of OpenAI API capabilities. To enable the eG agent to collect these metrics, the following prerequisite must be fulfilled:
The eG agent should be configured with the Admin API Key and Project API Key associated with the OpenAI organization. The Admin API key provides access to organization-level information, while the Project API key enables access to services within a specific OpenAI project.
The following sections explain how to obtain the Admin API key and Project API key from the OpenAI API Platform.
Creating Admin API Key
To determine the Admin API key, follow the steps given below:
-
Open a web browser and navigate to the OpenAI API Platform.
-
Sign in using an account with Organization Owner privileges.
-
Once you sign in, the Home page appears, as shown in Figure 1.
-
Next, in the left navigation pane of Figure 1, click the Settings option. The Project Settings page then appears as shown in Figure 2, displaying the settings of the currently selected project.
-
In the Project Settings page, click Organization settings in the upper-right corner. The Organization settings page then appears (see Figure 3).
-
In the left navigation pane of the Organization settings page, click Admin keys (see Figure 3). The Admin keys page then appears, displaying the existing Admin API keys, if any.
-
To create a new Admin API key, click Create new Admin key in the upper-right corner (see Figure 4).
-
In the Create new admin key window that appears (Figure 5), enter a name for the key in the Name field.
Figure 5 : The Create new admin key Window
Next, set the Expiration and Permissions for the Admin API key, and then click the Create admin key button.
-
Once the Admin API key is created, copy the generated secret key (see Figure 6).
Figure 6 : Copying the new Admin key
Save the newly created Admin key securely and specify this key in the Admin API Key text box while configuring the tests.
Creating Project API Key
To monitor the API capabilities and services of an OpenAI project, a Project API key is required. This key allows the eG agent to authenticate REST API requests and monitor the availability and responsiveness of OpenAI services within the selected project.
-
Sign in to the OpenAI API Platform using your OpenAI account credentials.
-
In the Home page (see Figure 1) that appears, select the project you want to monitor from the project selector in the upper-left corner.
-
In the left navigation pane in Figure 1, click the API Keys option.
-
The API keys page appears, displaying the existing API keys, if any. To create a new Project key, click the Create new secret key button in the upper-right corner.
Figure 7 : The API keys page
-
In the Create new secret key window, configure the required settings.
Figure 8 : The Create new secret key window
Owned by - Select You tab to create a user-owned API key or Service account tab to create a key associated with a service account.
Name - Enter a name for the API key.
Project - Select the OpenAI project that you want to monitor.
Expiration - Select the required expiration period for the key.
Permissions - Select the appropriate permission level:
-
All - Grants read and write access to supported API resources.
-
Restricted - Allows you to configure specific API permissions.
-
Read only - Grants read-only access to supported API resources.
-
-
Once the Project API key is created, the Save your key window appears.
-
Click the Copy button in Figure 9 to copy the generated secret key.
-
Save the copied key securely, as the secret key cannot be viewed again after closing the Save you key window.
-
Finally, Click the Done button to close the window.
The newly created Project API key should be specified against the API KEYS parameter of the OpenAI Services Health test. To monitor multiple OpenAI projects, specify the corresponding Project API keys as a comma-separated list in the API KEYS text box.