Home

Healthcheck

Healthcheck service is run to verify the health of your Unravel installation. Healthcheck is enabled by default and runs automatically in the backdrop to ensure that all the Unravel services are running and in a good state. You can set email alerts to receive the healthcheck reports. By default, Healthcheck services are run automatically every hour. You can configure the interval period for running Healthcheck services.

Healthcheck can be disabled and re-enabled if required.

Running Healthcheck

After all the configurations are set, you can run the healthcheck as follows:

  • Run healthcheck:

    <Unravel installation directory>/unravel/manager healthcheck
    
  • Run only a specific check:

    <Unravel installation directory>/unravel/manager healthcheck <check_name>
    
  • Run healthcheck for a specific tag:

    <Unravel installation directory>/unravel/manager healthcheck <tagname>
    
  • Skip a specific check when running healthcheck:

    <Unravel installation directory>/unravel/manager healthcheck ~checkname
    
  • Skip a specific tag when running healthcheck:

    <Unravel installation directory>/unravel/manager healthcheck ~tagname
    

Setting intervals for running Healthcheck reports

By default, healthcheck runs periodically on an hourly basis. Run the following steps to change this default interval.

  1. Stop Unravel

    <Unravel installation directory>/unravel/manager stop
    
  2. Change the Healthcheck interval period as follows:

    <Unravel installation directory>/unravel/manager config healthcheck period <time in seconds>
    
    ##For example:
    opt/unravel-install/unravel/manager config healthcheck period 1234 
    The interval between healthcheck reports is set to 1234 seconds.
    
  3. Apply the changes.

    <Unravel installation directory>/unravel/manager config apply
    
  4. Start Unravel

    <Unravel installation directory>/unravel/manager start

Viewing the Healthcheck reports

The Healthcheck reports are available in a tar file at <Unravel_installation_directory>/unravel/data/healthcheck location. When you untar the file, the following results are shown:

  • global: Contains configurations, system, and statistics-related data files.

  • healthcheck.log: contains log messages.

  • healthcheck.report.txt: contains the Healthcheck report, which is the same as the console output.

  • healthcheck.yaml: contains all the collected (gather/check) details.

  • services: contains services-related data files.

Tip

You can run manager healthcheck --help command to view all the available checks in a healthcheck report.

Setting Healthcheck email alerts

Before setting the Healthcheck email alerts, ensure that the email alert settings are already configured. Email alerts

  1. Stop Unravel

    <Unravel installation directory>/unravel/manager stop
    
  2. Set the Healthcheck email alerts. You can set the condition when to send the email for healthcheck reports to any of the following options:

    • never: Never email the healthcheck reports.

    • always: Always email the healthcheck reports.

    • error-only: Email the healthcheck reports only when issues are detected.

      Note

      Warnings in the Healthcheck report are considered as errors if you choose email alerts with error-only option.

    <Unravel installation directory>/unravel/manager config healthcheck alerts <Condition when to send email>
    
    ##Example:
    /opt/unravel/manager config healthcheck alerts never
    /opt/unravel/manager config healthcheck alerts always
    /opt/unravel/manager config healthcheck alerts error-only
  3. Apply the changes.

    <Unravel installation directory>/unravel/manager config apply
    
  4. Start Unravel

    <Unravel installation directory>/unravel/manager start

You can run a healthcheck and receive the health check reports without setting an email alert as well. For this, you must run the healthcheck report with the --send-email option and any of the following conditions when to send the email:

  • never: Never email the healthcheck reports.

  • always: Always email the healthcheck reports.

  • error-only: Email the healthcheck reports only when issues are detected.

    Note

    Warnings in the Healthcheck report are considered as errors if you choose email alerts with error-only option.

<Unravel installation directory>/unravel/manager healthcheck --send-email <Condition when to send email>

##Example:
/opt/unravel/manager healthcheck --send-email never
/opt/unravel/manager healthcheck --send-email always
/opt/unravel/manager healthcheck --send-email error-only

To view the Healthcheck report from an email attachment, download the attachment and run the following command:

sed 's/.*Bundle://' < /path/to/bundle | base64 --decode | tar xz

Disable/re-enable Healthcheck service

  1. Stop Unravel

    <Unravel installation directory>/unravel/manager stop
    
  2. Disable Healthcheck service

    <Unravel installation directory>/unravel/manager service disable healthcheck --permanent
    

    Re-enable Healthcheck service

    <Unravel installation directory>/unravel/manager service enable healthcheck --permanent
    
  3. Apply the changes.

    <Unravel installation directory>/unravel/manager config apply
    
  4. Start Unravel

    <Unravel installation directory>/unravel/manager start