<aside> 💡 Installation instructions are available here: • Monitoring ServiceLinking Client

Please make sure you’ve installed both to fully use and enjoy Sundial!

</aside>

Getting Started

The Monitoring Service dashboard is available at http://localhost:3000/

The first time you run Sundial, you’ll need to make a user account. You’ll use this to sign in.

Screenshot 2023-12-21 at 10.19.39 AM.png

After you’ve signed in, you’ll be redirected to the dashboard, which is also the Jobs page.

If you haven’t registered any jobs yet, your dashboard will be empty.

Screenshot 2023-12-21 at 10.32.38 AM.png


Navigating the Sundial UI

Sundial has two pages: the Jobs page and the Machines page.

They can be accessed by clicking the hamburger menu in the upper left corner, beside the logo.

main-page-empty.png

hamburger-menu.png


Registering Machines

The Machines page displays a list of all of the currently registered servers.

To get started, you’ll want to register each machine with cron jobs you’d like to monitor and manage.

Screenshot 2023-12-21 at 10.41.59 PM.png

Click ADD NEW KEY to register a new machine and copy the command.

Screenshot 2023-12-21 at 10.42.23 PM.png

Next, run the commandsundial register from the command line of the remote machine with one of these flags:

sundial register establishes the connection between the host machine and the remote machine.

Screenshot 2023-12-21 at 10.42.59 PM.png

Machines that have been registered will display an IP address. If a machine does not display one, it still needs to be registered!


Discovering Jobs

Run sundial discover from the command line to add jobs from a machine’s crontab, line-by-line.


Monitoring Jobs

<aside> 💡 In order to monitor cron jobs on your local machine or a remote node, please make sure you've installed the Linking Client, have followed the registration steps, and have ‘discovered’ jobs.

</aside>

failing-and-succeeding-runs.png

Jobs will be coloured either green or red to indicate the status of the most recent run.


Runs

If you click on a job, the job’s runs will be displayed (ordered by most to least recent).

failing-and-succeeding runs.png


Errors

If any runs encounter an error, you’ll be able to see their accompanying error logs. Click on the error log dialog box to open it.

error-run-closed.png

error-run-open.png


Managing Jobs

Adding Jobs

To add new jobs, click the ADD NEW button.

filled-out-job.png

  1. Pick a machine from the drop-down list; the job will be added to the crontab of that machine.
  2. Fill out the rest of the fields – name and tolerable runtime are optional – and click Submit.
    1. The Schedule has a translator and will show the schedule below the schedule string.

The job should now appear on the Jobs page.

newly-added-job.png


Editing Jobs

To edit a job, click the EDIT button on any job. You can change any of the fields present.

edited-job.png


Deleting Jobs

To delete a job, click the DELETE button on any job. A prompt will appear to make sure that you want to delete it!

delete-job.png


Monitoring Service API

All requests to the Monitoring Service API are sent via http://localhost:58669/api

Route Definition or Meaning Notes
/monitors GET - get all monitors
POST - add a new monitor POST - requires a valid schedule and a command
/monitors/:id GET - get a particular monitor
PUT - update a monitor
DELETE - delete a monitor PUT - requires a valid schedule and a command
/monitors/runs/:id GET - get all of the runs for a particular monitor
/remote-host GET - get all remote nodes
POST - add a new remote node
/remote-host/:id PUT - update the name of a remote node

CLI Commands & Scripts

User Commands Description
sundial discover Discovers jobs in a machine’s crontab.
sundial register Registers a remote machine with the Monitoring Service.
Service Scripts Used by the Linking Client
sundial update Updates a machine’s crontab based on user actions in the Sundial UI (adding, editing, and deleting jobs).
sundial run Provides the Monitoring Service with the capability to monitor jobs.
sundial listen Executes a listening server as a background process. Listens for any job updates from the Sundial UI.

If you’d like to know more about these commands and scripts, or anything else related to the Sundial architecture and implementation, please have a look at our case study.