Monitor

The Monitor menu allows you to view the Access Gateway logs, as well as enable/disable and configure the monitoring API.

Select 4 to open the Monitoring sub-menu.

Monitor commands

  1. Monitor logs: Display the monitor log.
  2. Enable debug: Enable debug for all services.
  3. Disable debug: Disable debug for all services.
  4. Show Memory statistics: Display current memory use statistics
  5. Configure REST API: Manage the monitoring REST api.
  6. Exit: exit the monitor sub-menu.

Caution

Enabling debug on a running Access Gateway system elevates the logging level from INFO to DEBUG and causes a considerable rise in the number of log messages generated.
Enabling debug monitoring should only be used when debugging applications and services. Failure to disable debug monitor could cause out of disk errors and system degradation. Always return the debug state to disabled (INFO) after diagnosing system or application errors.

Monitor logs

  1. Select 1 to display monitoring messages.
  2. Enter Ctrl + c to exit Monitor Logs.

Enable debug

  1. Select 2 to enable debug.

Disable debug

  1. Select 3 to disable debug.

Show Memory statistics

  1. Select 4 to display current memory statistics including total, used, free, shared, cache in use and available.

Configure REST API

Monitoring REST API management supports three functions:

To navigate to the monitoring sub-menu:

  1. Connect to the admin instance Access Gateway Management console.
    ssh oag-mgmt@[admin.tld]
  2. Select 4 - Monitoring
  3. Select 5 - Configure REST APIs

The Configure REST API sub-menu will be display and resemble:

Configure REST APIs ...
Base URL: https://[domain.tld]
Endpoint: /basic_status
Status:[Enabled/Disabled]
1: Disable/Enable Monitoring APIs
2: Edit endpoint name
3: Manage allowed IPs
										
x: Exit

Enable or Disable monitoring

The monitoring REST APIs are disabled by default.
To enable or disable the monitoring REST API.

  1. Press 1 to enable or disable the monitoring REST API.

    The Monitoring REST API menu will display showing the enabled or disabled state.

    Configure REST APIs
    ...
    Status:[Enabled/Disabled]
    1: [Disable|Enable] Monitoring APIs
    . . . 										
    x: Exit
    

    A confirmation will display, confirming the change.

  2. Press any key to continue.

Configure basic status API name

The monitoring REST API endpoint name can be changed as required.

  1. Press 2 to change the endpoint name.

    The current endpoint URI will display and resemble:

    Configure REST APIs ...
    
    Current endpoint name: /basic_status: 
    . . . 		 								
    [m]odify | [c]ommit changes | e[x]it
    
  2. Enter m to enter a new endpoint name.
      Configure REST APIs .,,
      
      Direction: Please provide the endpoint name without . . .  
      
      Enter new endppoint name:					
    1. At the prompt enter a new endpoint location, followed by the return key.
      For example:/mystatusendpoint [cr].
      The new status endpoint value will be displayed.
      Configure REST APIs ...
      
      Current API location: mystatusendpoint: 
      . . . 		 								
      [m]odify | [c]ommit changes | e[x]it
      
    2. Enter c to commit the change or x to cancel.
    3. After a change enter x to return to the prior menu.

Configure allowed IPs

The monitoring REST API only allows client requests from known predefined IP addresses. Addresses can be added or deleted and changes must be committed to take effect.

  1. Press 3 to add or delete addresses.

    The current allowed IP address list will be displayed and will resemble:

    Configure REST APIs ...
    
    Current allowed IPs or CIDRs: 
    . . . 		 								
    [a]dd an entry | [d]elete an entry | [c]ommit changes | e[x]it
    
  2. Press x to return the main monitor API menu.
  3. Enter a to add a new entry.
      Enter an IP address or a CIDR:					
    1. At the prompt enter a fully qualified IPV4 address or a CIDR address, followed by the return key.
      For example:192.168.1.0/24 [cr]
      The newly entered address will be added to the display.
      Configure REST APIs ...
      
      Current allowed IPs or CIDRs: 
      1: 192.168.1.0/24
      . . . 		 								
      [a]dd an entry | [d]elete an entry | [c]ommit changes | e[x]it
      
    2. Repeat as required to add additional IP/CIDR addresses.
  4. Enter d to delete an existing entry.
      Configure REST APIs ...
      
      Select an existing IP or CIDR from the list:
      1: 192.168.1.0/24
      2: 192.168.4.0/24					
    1. At the prompt enter the index of the address to be deleted followed by the return key. The newly updated list will be displayed.
      Configure REST APIs ...
      
      
      Current allowed IPs or CIDRs: 
      1: 192.168.1.0/24
      . . . 		 								
      [a]dd an entry | [d]elete an entry | [c]ommit changes | e[x]it				
    2. Repeat as required to delete additional IP/CIDR addresses.
  5. Enter c to commit changes.
    Any pending additions or deletions are then committed.
  6. Press x to return the main menu.