Error: "The URI is invalid or not supported"

Symptom

An agent is in an error state and is not collecting data for one of its monitored resources.

The response to a REST API GET request on the agent URI looks like the following example:

{
    "name": "com.arubanetworks.bgp_monitor1.0.Agent1",
    "disabled":false,
    "parameters_values":{
             "threshold":"10"
     }
    "status": {
     "error_at": "1490134092",
     "error_description": "The URI is invalid or not supported",
     "executed_at": "1490134092",
}

In the preceding example:

error_at

Shows the time, in epoch format, at which the error occurred.

executed_at

Shows the time, in epoch format, at which the agent was last executed (not the time at which the agent was created).

Cause

The agent attempted to access a URI that is not supported or does not exist at the time the agent executed the request.

Action
  1. Determine which URI is invalid or not supported:
    1. Search for the following error in the event log:

      NAE Agent <AGENT_NAME> with URI <URI> encountered an error and cannot collect samples

      <AGENT_NAME>

      Specifies the name of the agent that encountered the error.

      <URI>

      Specifies the URI of the resource the agent attempted to access.

      For example:

      NAE Agent com.hpe.bgpmonitor1.0.Agent1 with URI /system/interfaces/1%2F1%2F5?attributes=nx_bytes has encountered an error and cannot collect samples

      In this example, the resource URI is /system/interfaces/1%2F1%2F5, which is interface 1/1/5.

  2. If the resource URI is supported on this switch and operating system version, the most likely reason for the error is that the switch resource—such as a port—is not in an UP state. Do the following:
    1. Resolve the problem that is causing the resource to be unavailable.

      For example, if a port is administratively down, bring the port to an UP state.

    2. Disable the agent.
    3. Enable the agent.
  3. If the agent uses a resource ID as a parameter and only that resource ID is invalid (such as a port that does not exist), do the following:
    1. Delete the agent.
    2. Create and enable an agent that specifies a valid resource ID (such as port number).
  4. If the resource URI is not supported on this switch and operating system version, modify the script to specify only URIs that are valid for this switch and operating system version.
    1. Delete all agents associated with the script.

      Consider recording information about the agent names and parameter values so that you can create equivalent agents from the modified script.

    2. Modify the script to specify only URIs that are valid for this switch and operating system version.
    3. Replace the script on the switch with the modified script.
    4. Create agents from the modified script.
    5. Enable the new agents.