admin - Convenience command

This command gives you various system information for FIWARE Orion, Cygnus, Perseo. You can use these information for troubleshooting.

Common Options

Options Description
--host value, -h value specify host or alias
--token value specify oauth token
--help show help (default: false)

log

This command allows you to print or set logging level for FIWARE Orion.

ngsi admin [command options] log [options]

Options

Options Description
--level value, -l value specify log level (none, fatal, error, warn, info, debug)
--logging, -L logging output when logging level higher than Info (default: false)
--pretty, -P pretty format (default: false)
--help show help (default: false)

Example

Request:

ngsi admin log
{"level":"DEBUG"}

Request:

ngsi admin log --level info

Trace

This command allows you to print, set or delete trace level for FIWARE Orion.

ngsi admin [common options] trace [options]

Options

Options Description
--level value, -l value specify log level
--set, -s set (default: false)
--delete, -d delete (default: false)
--logging, -L logging output when logging level higher than Info (default: false)
--help show help (default: false)

Example

Request:

ngsi admin trace
{"tracelevels":"empty"}

Request:

ngsi admin trace --level t1
ngsi admin trace --level t1-t2
ngsi admin trace --level t1-t2,t3-t4
ngsi admin trace --level 180-199

Request:

ngsi admin trace --delete
ngsi admin trace --delete --level t1
ngsi admin trace --delete --level t1-t2
ngsi admin trace --delete --level t1-t2,t3-t4

Semaphore

This command prints semaphore for FIWARE Orion.

ngsi admin [command options] semaphore [options]

Options

Options Description
--logging, -L logging output when logging level higher than Info (default: false)
--pretty, -P pretty format (default: false)
--help show help (default: false)

Example

Request:

ngsi admin semaphore --pretty
{
  "dbConnectionPool": {
    "status": "free"
  },
  "dbConnection": {
    "status": "free"
  },
  "request": {
    "status": "free"
  },
  "subCache": {
    "status": "free"
  },
  "transaction": {
    "status": "free"
  },
  "timeStat": {
    "status": "free"
  },
  "logMsg": {
    "status": "free"
  },
  "alarmMgr": {
    "status": "free"
  },
  "metricsMgr": {
    "status": "free"
  },
  "connectionContext": {
    "status": "free"
  },
  "connectionEndpoints": {
    "status": "free"
  }
}

Metrics

This command allows you to print, reset or delete metrics for FIWARE Orion, Cygnus.

ngsi admin [command options] metrics [options]

Options

Options Description
--delete, -d delete metrics (default: false)
--reset, -r reset metrics (default: false)
--logging, -L logging output when logging level higher than Info (default: false)
--pretty, -P pretty format (default: false)
--help show help (default: false)

Example

Request:

ngsi admin metrics --pretty
{
  "services": {
    "default-service": {
      "subservs": {
        "root-subserv": {
          "incomingTransactionResponseSize": 1734,
          "serviceTime": 0.000461688,
          "incomingTransactions": 16
        }
      },
      "sum": {
        "incomingTransactionResponseSize": 1734,
        "serviceTime": 0.000461688,
        "incomingTransactions": 16
      }
    }
  },
  "sum": {
    "subservs": {
      "root-subserv": {
        "incomingTransactionResponseSize": 1734,
        "serviceTime": 0.000461688,
        "incomingTransactions": 16
      }
    },
    "sum": {
      "incomingTransactionResponseSize": 1734,
      "serviceTime": 0.000461688,
      "incomingTransactions": 16
    }
  }
}

Request:

ngsi admin metrics --reset --pretty
{
  "services": {
    "default-service": {
      "subservs": {
        "root-subserv": {
          "incomingTransactionResponseSize": 482,
          "serviceTime": 0.000316,
          "incomingTransactions": 1
        }
      },
      "sum": {
        "incomingTransactionResponseSize": 482,
        "serviceTime": 0.000316,
        "incomingTransactions": 1
      }
    }
  },
  "sum": {
    "subservs": {
      "root-subserv": {
        "incomingTransactionResponseSize": 482,
        "serviceTime": 0.000316,
        "incomingTransactions": 1
      }
    },
    "sum": {
      "incomingTransactionResponseSize": 482,
      "serviceTime": 0.000316,
      "incomingTransactions": 1
    }
  }
}

Request:

ngsi admin metrics --delete

Statistics

This command allows you to print or delete statistics for FIWARE Orion, Cygnus.

ngsi admin [command options] statistics [options]

Options

Options Description
--delete, -d delete metrics (default: false)
--logging, -L logging output when logging level higher than Info (default: false)
--pretty, -P pretty format (default: false)
--help show help (default: false)

Example

Request:

 ngsi admin statistics --pretty
{
  "uptime_in_secs": 156334,
  "measuring_interval_in_secs": 156334
}

Request:

ngsi admin statistics --delete

Cache statistics

This command allows you to print or delete cache statistics for FIWARE Orion.

ngsi admin [command options] cacheStatistics [options]

Options

Options Description
--delete, -d delete metrics (default: false)
--logging, -L logging output when logging level higher than Info (default: false)
--pretty, -P pretty format (default: false)
--help show help (default: false)

Example

Request:

ngsi admin cacheStatistics --pretty
{
  "ids": "",
  "refresh": 2011,
  "inserts": 0,
  "removes": 0,
  "updates": 0,
  "items": 0
}

Request:

ngsi admin cacheStatistics --delete