Centreon Gorgone and his "gorgoned" daemon is a lightweight, distributed, modular tasks handler.
It provides a set of actions like:
The daemon can be installed on Centreon environments like Centreon Central, Remote and Poller servers.
It uses ZeroMQ library.
Get the connection status of all nodes managed by the Gorgone daemon.
OK
Unauthorized
Forbidden
Local Gorgone instance
Remote Gorgone instance
{- "action": "constatus",
- "message": "ok",
- "data": {
- "id": {
- "last_ping_sent": 1577726040,
- "type": "push_zmq",
- "nodes": { },
- "last_ping_recv": 1577726040
}
}
}
Get informations and statistics about loaded modules, available endpoints and number of events computed at runtime.
OK
Unauthorized
Forbidden
Local Gorgone instance
Remote Gorgone instance
{- "action": "information",
- "message": "ok",
- "data": {
- "modules": {
- "httpserver": "gorgone::modules::core::httpserver::hooks",
- "dbcleaner": "gorgone::modules::core::dbcleaner::hooks",
- "cron": "gorgone::modules::core::cron::hooks",
- "engine": "gorgone::modules::centreon::engine::hooks",
- "action": "gorgone::modules::core::action::hooks",
- "statistics": "gorgone::modules::centreon::statistics::hooks",
- "nodes": "gorgone::modules::centreon::nodes::hooks",
- "legacycmd": "gorgone::modules::centreon::legacycmd::hooks",
- "proxy": "gorgone::modules::core::proxy::hooks"
}, - "api_endpoints": {
- "POST_/internal/logger": "BCASTLOGGER",
- "GET_/centreon/statistics/broker": "BROKERSTATS",
- "GET_/internal/thumbprint": "GETTHUMBPRINT",
- "GET_/core/cron/definitions": "GETCRON",
- "GET_/internal/information": "INFORMATION",
- "POST_/core/cron/definitions": "ADDCRON",
- "POST_/core/action/command": "COMMAND",
- "POST_/core/proxy/remotecopy": "REMOTECOPY",
- "POST_/centreon/engine/command": "ENGINECOMMAND",
- "PATCH_/core/cron/definitions": "UPDATECRON",
- "DELETE_/core/cron/definitions": "DELETECRON",
- "GET_/internal/constatus": "CONSTATUS"
}, - "counters": {
- "total": 40210,
- "external": {
- "total": 0
}, - "internal": {
- "legacycmdready": 1,
- "setlogs": 7841,
- "enginecommand": 20,
- "registernodes": 443,
- "pong": 3397,
- "proxyready": 5,
- "statisticsready": 1,
- "addcron": 1,
- "cronready": 1,
- "getthumbprint": 2,
- "centreonnodesready": 1,
- "httpserverready": 1,
- "command": 4446,
- "putlog": 9809,
- "dbcleanerready": 1,
- "information": 6,
- "brokerstats": 4446,
- "constatus": 1,
- "total": 40210,
- "setcoreid": 443,
- "getlog": 8893,
- "engineready": 1,
- "unregisternodes": 443,
- "actionready": 1
}, - "proxy": {
- "enginecommand": 10,
- "getlog": 4446,
- "total": 8902,
- "command": 4446
}
}
}
}
Get the thumbprint of the public key of the Gorgone daemon.
OK
Unauthorized
Forbidden
Local Gorgone instance
Remote Gorgone instance
{- "action": "getthumbprint",
- "message": "ok",
- "data": {
- "thumbprint": "cS4B3lZq96qcP4FTMhVMuwAhztqRBQERKyhnEitnTFM"
}
}
Set the logger severity level for all modules.
severity | string Enum: "info" "error" "debug" Severity level to be defined for all loaded modules |
OK
Unauthorized
Forbidden
Local Gorgone instance
Remote Gorgone instance
{- "severity": "info"
}
{- "error": "http_error_401",
- "message": "unauthorized"
}
Retrieve the event's logs based on event's token.
token required | string Example: 1d48a26a0fc37c1d8658222378044007d9c12311ba49b214de633739be05353415eee946f41b43babb6cb2a083a45c0d6359f361874af39a45b07542de8e2165 Token of the event |
code | integer Enum: 0 1 2 Example: code=2 Only retrieve logs with defined code |
limit | integer >= 1 Example: limit=1 Only retrieve the last x logs |
ctime | integer <int64> Example: ctime=1577726040 Only retrieve logs with a creation time equal or superior to a timestamp |
etime | integer <int64> Example: etime=1577726040 Only retrieve logs of an event time superior to a timestamp |
OK
Unauthorized
Forbidden
Local Gorgone instance
Remote Gorgone instance
{- "message": "Logs found",
- "token": "03008486ba50b52e529ff5828d1432e5578dd18bb530c145b133dc902c8cfa6b8aac4d58fffb0c5ed44b943d2acbfb7cd1b18c55fcebce62e51999db460112c7",
- "data": [
- {
- "ctime": 1577727699,
- "etime": 1577727699,
- "id": 101483,
- "instant": 0,
- "data": { },
- "token": "03008486ba50b52e529ff5828d1432e5578dd18bb530c145b133dc902c8cfa6b8aac4d58fffb0c5ed44b943d2acbfb7cd1b18c55fcebce62e51999db460112c7",
- "code": 2
}
]
}
List all cron definitions.
OK
Unauthorized
Forbidden
Local Gorgone instance
Remote Gorgone instance
{- "token": "1d48a26a0fc37c1d8658222378044007d9c12311ba49b214de633739be05353415eee946f41b43babb6cb2a083a45c0d6359f361874af39a45b07542de8e2165"
}
Add one or multiple cron definitions to runtime.
timespec required | string Cron-like time specification |
id required | string Unique identifier of the cron definition |
action required | string Action/event to call at job execution |
parameters required | object Parameters needed by the called action/event |
keep_token | boolean Boolean to define whether or not the ID of the definition will be used as token for the command |
OK
Unauthorized
Forbidden
Local Gorgone instance
Remote Gorgone instance
[- {
- "timespec": "string",
- "id": "string",
- "action": "string",
- "parameters": { },
- "keep_token": true
}
]
{- "token": "1d48a26a0fc37c1d8658222378044007d9c12311ba49b214de633739be05353415eee946f41b43babb6cb2a083a45c0d6359f361874af39a45b07542de8e2165"
}
List cron definition identified by id.
definition_id required | string Example: broker_stats ID of the definition |
OK
Unauthorized
Forbidden
Local Gorgone instance
Remote Gorgone instance
{- "token": "1d48a26a0fc37c1d8658222378044007d9c12311ba49b214de633739be05353415eee946f41b43babb6cb2a083a45c0d6359f361874af39a45b07542de8e2165"
}
Update a cron definition.
definition_id required | string Example: broker_stats ID of the definition |
timespec required | string Cron-like time specification |
id required | string Unique identifier of the cron definition |
action required | string Action/event to call at job execution |
parameters required | object Parameters needed by the called action/event |
keep_token | boolean Boolean to define whether or not the ID of the definition will be used as token for the command |
OK
Unauthorized
Forbidden
Local Gorgone instance
Remote Gorgone instance
{- "timespec": "string",
- "id": "string",
- "action": "string",
- "parameters": { },
- "keep_token": true
}
{- "token": "1d48a26a0fc37c1d8658222378044007d9c12311ba49b214de633739be05353415eee946f41b43babb6cb2a083a45c0d6359f361874af39a45b07542de8e2165"
}
Delete a cron definition.
definition_id required | string Example: broker_stats ID of the definition |
OK
Unauthorized
Forbidden
Local Gorgone instance
Remote Gorgone instance
{- "token": "1d48a26a0fc37c1d8658222378044007d9c12311ba49b214de633739be05353415eee946f41b43babb6cb2a083a45c0d6359f361874af39a45b07542de8e2165"
}
Get a definition execution status.
definition_id required | string Example: broker_stats ID of the definition |
OK
Unauthorized
Forbidden
Local Gorgone instance
Remote Gorgone instance
{- "token": "1d48a26a0fc37c1d8658222378044007d9c12311ba49b214de633739be05353415eee946f41b43babb6cb2a083a45c0d6359f361874af39a45b07542de8e2165"
}
Module aiming to execute actions on the server running the Gorgone daemon or remotly using SSH.
Execute a command or a set of commands on server running Gorgone.
command required | string Command to execute |
timeout | integer Default: 30 Time in seconds before a command is considered timed out |
continue_on_error | boolean Default: false Behaviour in case of execution issue |
OK
Unauthorized
Forbidden
Local Gorgone instance
Remote Gorgone instance
[- {
- "command": "echo data > /tmp/date.log",
- "timeout": 5,
- "continue_on_error": true
}
]
{- "token": "1d48a26a0fc37c1d8658222378044007d9c12311ba49b214de633739be05353415eee946f41b43babb6cb2a083a45c0d6359f361874af39a45b07542de8e2165"
}
Send an external command or a set of external commands to a running Centreon Engine instance using command file pipe. This method needs the commands to be preformatted as Nagios external commands format.
command_file | string Path to the Centreon Engine command file pipe |
command | Array of strings |
OK
Unauthorized
Forbidden
Local Gorgone instance
Remote Gorgone instance
{- "command_file": "/var/lib/centreon-engine/rw/centengine.cmd",
- "command": [
- "[653284380] SCHEDULE_SVC_CHECK;host1;service1;653284380"
]
}
{- "token": "1d48a26a0fc37c1d8658222378044007d9c12311ba49b214de633739be05353415eee946f41b43babb6cb2a083a45c0d6359f361874af39a45b07542de8e2165"
}
Launch Broker statistics collection and store the result on disk.
OK
Unauthorized
Forbidden
Local Gorgone instance
Remote Gorgone instance
{- "token": "1d48a26a0fc37c1d8658222378044007d9c12311ba49b214de633739be05353415eee946f41b43babb6cb2a083a45c0d6359f361874af39a45b07542de8e2165"
}
Launch Broker statistics collection and store the result on disk.
monitoring_server_id required | integer Example: 2 ID of the monitoring server |
OK
Unauthorized
Forbidden
Local Gorgone instance
Remote Gorgone instance
{- "token": "1d48a26a0fc37c1d8658222378044007d9c12311ba49b214de633739be05353415eee946f41b43babb6cb2a083a45c0d6359f361874af39a45b07542de8e2165"
}
Add one Centreon Autodiscovery job to discover hosts.
job_id required | integer ID of the Host Discovery job |
target required | integer Identifier of the target on which to execute the command |
command_line required | string Command line to execute to perform the discovery |
timeout | integer Time in seconds before the command is considered timed out |
execution required | object Execution mode of this job ('0': execute immediately, '1': schedule with cron) |
post_execution | object Post-execution settings |
OK
Unauthorized
Forbidden
Local Gorgone instance
Remote Gorgone instance
{- "job_id": 14,
- "target": 2,
- "command_line": "perl /usr/lib/centreon/plugins/centreon_generic_snmp.pl --plugin=os::linux::local::plugin --mode=discovery-snmp --subnet='10.1.2.3/24' --snmp-port='161' --snmp-version='2c' --snmp-community='public'",
- "timeout": 300,
- "execution": {
- "mode": 0,
- "parameters": {
- "cron_definition": "*/10 * * * *"
}
}, - "post_execution": {
- "commands": [
- {
- "action": "COMMAND",
- "command_line": "/usr/share/centreon/www/modules/centreon-autodiscovery-server/script/run_save_discovered_host --job-id=14"
}
]
}
}
{- "token": "1d48a26a0fc37c1d8658222378044007d9c12311ba49b214de633739be05353415eee946f41b43babb6cb2a083a45c0d6359f361874af39a45b07542de8e2165"
}
Launch a host discovery job identified by id (even if in cron mode).
job_id required | integer Example: 2 ID of the job |
OK
Unauthorized
Forbidden
Local Gorgone instance
Remote Gorgone instance
{- "token": "1d48a26a0fc37c1d8658222378044007d9c12311ba49b214de633739be05353415eee946f41b43babb6cb2a083a45c0d6359f361874af39a45b07542de8e2165"
}
Delete one Centreon Autodiscovery scheduled job.
token required | string Example: discovery_14_6b7d1bb8 Token of the scheduled job |
OK
Unauthorized
Forbidden
Local Gorgone instance
Remote Gorgone instance
{- "token": "1d48a26a0fc37c1d8658222378044007d9c12311ba49b214de633739be05353415eee946f41b43babb6cb2a083a45c0d6359f361874af39a45b07542de8e2165"
}