User Tools

Site Tools


products:promonitor:6.8:userguide:api:maintenance

Table of Contents

Maintenance

Ad hoc

Description:

  • Ad hoc maintenance API can start and stop the maintenance of one or several systems from one group.
  • Its particularity is that you can use group name and system SID instead of UUIDs, which makes it more practical
  • Maintenance lasts for a given duration and can be started either immediately or at a specified date.
  • With Ad hoc, maintenances are scheduled once and will not repeat.

Services:

Start maintenance
Description Starts the maintenance of systems immediately or at specified date
Method PUT
URL /maintenance/adhoc/start
Parameters
group The name of the group mandatory
systems Coma separated list of SAP sids mandatory
duration Duration of the maintenance in minutes mandatory
startdate Start date of the maintenance (yyyyMMddHHmmz) optional
Example
/maintenance/adhoc/start?group=Agentil&systems=HA5,IDZ&duration=60&startdate=202006301200CET
Stop maintenance
Description Immediately stops maintenance of the systems
Method PUT
URL /maintenance/adhoc/stop
Parameters
group The name of the group mandatory
systems Coma separated list of SAP sids mandatory
Example
/maintenance/adhoc/stop?group=Agentil&systems=HA5,IDZ

Definitions

Description:

  • Maintenance definitions can be created do define recurrent and scheduled maintenance
  • Recurrent maintenance defines maintenance periods occuring as per a cron.
  • Scheduled maintenance define a maintenance period occuring just once.
  • When a maintenance is triggered, it creates a “maintenance period” which will prevent any monitor to be executed on a system.
  • Maintenance periods can be stopped at any time, resuming the montoring of the systems.
  • To stop a maintenance period will not prevent the next maintenance to happen as per its cron

Services:

GET All maintenance definition
Description Get maintenance definitions
Method GET
URL /maintenance/definitions/all
Parameters
No parameters
Example
/maintenance/definitions/all
Returns
[
  {
    "id": "b52adc25-daf0-45fd-88c3-bdd59ee7b375",
    "name": "maintenance once",
    "cron": null,
    "duration": 10,
    "startTime": 1594288200000,
    "active": true,
    "creationTime": 1594288149814,
    "systemsJson": "[{ \"groupid\":\"bdf0e47c-6f0b-49c1-a142-3861bf8e749c\",\"systemid\":\"de74adf5-82a2-4e08-92d1-8f599271c01d\" }]",
    "type": "SCHEDULED"
  },
  {
    "id": "53f57305-6ef8-4ea7-a52a-33f4007e5d5e",
    "name": "maintenance every 5",
    "cron": "0 0/5 * * * ? *",
    "duration": 2,
    "startTime": 1594288200000,
    "active": true,
    "creationTime": 1594303785291,
    "systemsJson": "[{ \"groupid\":\"bdf0e47c-6f0b-49c1-a142-3861bf8e749c\",\"systemid\":\"de74adf5-82a2-4e08-92d1-8f599271c01d\" }]",
    "type": "RECURRENT"
  }
]
CREATE recurrent maintenance definition
Description Create recurrent maintenance definition
Method POST
URL /maintenance/definitions
JSON Body
name The name of the maintenance mandatory
duration The duration of the maintenance in minutes mandatory
active The state of the maintenance (ignored if false) mandatory
cron The cron string mandatory
type The type of maintenance: RECURRENT mandatory
systemsJson A json table of tuples for groupid and systemid mandatory
Example
{
    "name": "maintenance every 5",
    "duration": 2,
    "active": true,
    "cron":"0 0/5 * * * ? *",    
    "type": "RECURRENT",
    "systemsJson": "[{ \"groupid\":\"bdf0e47c-6f0b-49c1-a142-3861bf8e749c\",\"systemid\":\"de74adf5-82a2-4e08-92d1-8f599271c01d\" }]"
}
  
Returns
{
  "id": "53f57305-6ef8-4ea7-a52a-33f4007e5d5e",
  "name": "maintenance every 5",
  "cron": "0 0/5 * * * ? *",
  "duration": 2,
  "active": true,
  "creationTime": 1594303785291,
  "systemsJson": "[{ \"groupid\":\"bdf0e47c-6f0b-49c1-a142-3861bf8e749c\",\"systemid\":\"de74adf5-82a2-4e08-92d1-8f599271c01d\" }]",
  "type": "RECURRENT"
}
CREATE scheduled maintenance definition
Description Create scheduled maintenance definition
Method POST
URL /maintenance/definitions
JSON Body
name The name of the maintenance mandatory
duration The duration of the maintenance in minutes mandatory
active The state of the maintenance (ignored if false) mandatory
startTime The startTime in EPOCH format mandatory
type The type of maintenance: SCHEDULED mandatory
systemsJson A json table of tuples for groupid and systemid mandatory
Example
{
    "name": "scheduled maintenance",
    "duration": 2,
    "active": true,
    "startTime": 1594288200000,  
    "type": "SCHEDULED",
    "systemsJson": "[{ \"groupid\":\"bdf0e47c-6f0b-49c1-a142-3861bf8e749c\",\"systemid\":\"de74adf5-82a2-4e08-92d1-8f599271c01d\" }]"
}
  
Returns
{
  "id": "53f57305-6ef8-4ea7-a52a-33f4007e5d5e",
  "name": "scheduled maintenance",
  "duration": 2,
  "startTime": 1594288200000,
  "active": true,
  "creationTime": 1594303785291,
  "systemsJson": "[{ \"groupid\":\"bdf0e47c-6f0b-49c1-a142-3861bf8e749c\",\"systemid\":\"de74adf5-82a2-4e08-92d1-8f599271c01d\" }]",
  "type": "SCHEDULED"
}
UPDATE maintenance definition
Description Update maintenance definition
Method PUT
URL /maintenance/definitions
JSON Body
id The id of the definition mandatory
name The name of the maintenance mandatory
duration The duration of the maintenance in minutes mandatory
active The state of the maintenance (ignored if false) mandatory
startTime or cron depending on the type mandatory
type The type of maintenance: RECURRENT or SCHEDULED mandatory
systemsJson A json table of tuples for groupid and systemid mandatory
Example
{   
    "id": "53f57305-6ef8-4ea7-a52a-33f4007e5d5e",
    "name": "scheduled maintenance",
    "duration": 2,
    "active": true,
    "startTime": 1594288200000,  
    "type": "SCHEDULED",
    "systemsJson": "[{ \"groupid\":\"bdf0e47c-6f0b-49c1-a142-3861bf8e749c\",\"systemid\":\"de74adf5-82a2-4e08-92d1-8f599271c01d\" }]"
}
  
Returns
{
  "id": "53f57305-6ef8-4ea7-a52a-33f4007e5d5e",
  "name": "scheduled maintenance",
  "duration": 2,
  "startTime": 1594288200000,
  "active": true,
  "creationTime": 1594303785291,
  "systemsJson": "[{ \"groupid\":\"bdf0e47c-6f0b-49c1-a142-3861bf8e749c\",\"systemid\":\"de74adf5-82a2-4e08-92d1-8f599271c01d\" }]",
  "type": "SCHEDULED"
}
DELETE maintenance definition
Description Delete created maintenance definitions
Method DELETE
URL /maintenance/definitions
Parameters
ids coma separated list of ids mandatory
Example
/maintenance/definitions?ids=53f57305-6ef8-4ea7-a52a-33f4007e5d5e
/home/clients/8c48b436badcd3a0bdaaba8c59a54bf1/wiki-web/data/pages/products/promonitor/6.8/userguide/api/maintenance.txt · Last modified: 2020/07/09 16:27 by rbariou