Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

MyTimetable can be monitored, for example by using monitoring tools such as Nagios. A status URL is available at /status, and a Health API is available at /health/. Both will be discussed in more detail below.

/status

The status controller returns a text representation of the MyTimetable status, and is available at the URL https://mytimetable_instance/status. The output looks something like:

Status information
MyTimetable WARNING
> DS_2015A: DataSource 'DS_2015A' (WARNING)
--------------------- --------------------------------------------------------- ------------------------------ -------
id                    description                                               value                          status 
--------------------- --------------------------------------------------------- ------------------------------ -------
alive                 Aliveness of the DataSource                               OK                             OK     
last_update           Timestamp of the last update of the DataSource            Sat, 7 Nov 2015 14:43:15 +0100 WARNING
last_update_since_sec Number of seconds since the last update of the DataSource 5949789                        WARNING

> ec_consumer: External Calendaring Consumer (OK)
---------------------------- ------------------------------------------------------------------------------ ------ ------
id                           description                                                                    value  status
---------------------------- ------------------------------------------------------------------------------ ------ ------
alive                        Aliveness of the application                                                   OK     OK    
ews_FAILED_PERMANENTLY       Number of synchronizations of type 'ews' with status 'FAILED_PERMANENTLY'      0      OK    
ews_FAILED_PERMANENTLY_perc  Percentage of synchronizations of type 'ews' with status 'FAILED_PERMANENTLY'  0,00   OK    
ews_FAILED_TEMPORARILY       Number of synchronizations of type 'ews' with status 'FAILED_TEMPORARILY'      0      OK    
ews_FAILED_TEMPORARILY_perc  Percentage of synchronizations of type 'ews' with status 'FAILED_TEMPORARILY'  0,00   OK    
ews_OK                       Number of synchronizations of type 'ews' with status 'OK'                      274    OK    
ews_OK_perc                  Percentage of synchronizations of type 'ews' with status 'OK'                  100,00 OK    

> ec_producer: External Calendaring Producer (OK)
----- ---------------------------- ----- ------
id    description                  value status
----- ---------------------------- ----- ------
alive Aliveness of the application OK    OK    

There are four possible return states:

  • 'MyTimetable OK' if all data sources have been updated in the last 36 hours and all components work as expected.
  • 'MyTimetable WARNING' followed by last update times for all data sources, if one or more data sources have not been updated within the last 36 hours. (In Scientia Syllabus Plus Enterprise Reporting Database 3.2.0, the last update time is not present. MyTimetable will always return WARNING in older MyTimetable versions, and always return OK in MyTimetable 2.4+)
  • 'MyTimetable ERROR' + exception message, if MyTimetable can not connect to one or more data sources, or if something else went wrong. This will also set the HTTP status to '503 Service Unavailable'.
  • HTTP '404 Not Found status',  if the application did not load correctly.

Please note that the exact text format will be different and less extensive for pre-3.0 MyTimetable instances.

/health/

Using the Health API, it is possible to retrieve a JSON representation of the MyTimetable status. The following URL's are available at the root of the MyTimetable instance using a HTTP GET request:

  • /health/: Full information, containing status of all components (consisting of a description, details and a status) and all details (consisting of a description, id, status and value).
  • /health/<component id>/status: Text string representing the status of a component ("OK", "WARNING" or "ERROR")
  • /health/<component id>/<detail id>/statusText string representing the status of a detail ("OK", "WARNING" or "ERROR")
  • /health/<component id>/<detail id>/value: Value of a detail (format depending on the type of the detail)


 

  • No labels