Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page describes the APIs that can be used to retrieve Dashboard information together with log gap report

Dashboard full information with current states API

Purpose:

Allows getting up-to-date information about Configuration(s), including the Configurations states (Busy, in Failover State, etc.) and Databases states (ONLINE, RECOVERING, etc), log gap, and others.

...

Expand
titleJSON
Code Block
languagejson
{
    "Status": 200,
    "Result": [
        {
            "ConfigurationId": 1,
            "ConfigurationType": "Oracle",
            "ConfigurationName": "DEV",
            "PrimaryHost": {
                "HostAddress": "oracle1",
                "OS": "linux",
                "DefaultBackupDir": "/usr/local/dbvisit/multiplatform/backup",
                "IPAddresses": [
                    "172.22.0.4"
                ],
                "ServiceUser": "oracle",
                "FileTransferListenAddress": "",
                "FileTransferListenPort": 7890
            },
            "StandbyHost": {
                "HostAddress": "oracle2",
                "OS": "linux",
                "DefaultBackupDir": "/usr/local/dbvisit/multiplatform/backup",
                "IPAddresses": [
                    "172.22.0.8"
                ],
                "ServiceUser": "oracle",
                "FileTransferListenAddress": "",
                "FileTransferListenPort": 7890
            },
            "Settings": {
                "ApplicationDelayMinutes": 0,
                "StandbyMode": {
                    "UndoFilePath": "",
                    "Enabled": false
                },
                "AutomatedStandbyUpdate": {
                    "Enabled": true,
                    "IntervalSeconds": 600,
                    "BackupType": "l"
                },
                "Notifications": {
                    "To": null
                },
                "Observer": {
                    "Enabled": true,
                    "NotificationOnly": true,
                    "CheckIntervalSeconds": 60,
                    "MaxFailCount": 3,
                    "SendEmail": false,
                    "SendSlack": false,
                    "HeartbeatEnabled": false,
                    "HeartbeatHour": 7,
                    "HeartbeatMinute": 0,
                    "Rule": ""
                }
            },
            "HasFailedOver": false,
            "LicenseInfo": {
                "LicenseKey": "4jo6z-8aaai-u09b6-ijjwh-2a276-1phe9-k1quu",
                "ExpiryDate": "2020-07-10"
            },
            "PrimaryDatabaseState": "ONLINE",
            "StandbyDatabaseState": "RECOVERING",
            "ConfigurationBusy": false,
            "GapTimeSeconds": 17984,
            "GapTime": "4 hours 59 minutes 44 seconds"
        },
        {
            "ConfigurationId": 3,
            "ConfigurationType": "SqlServer",
            "ConfigurationName": "SQLTestBigDB",
            "PrimaryHost": {
                "HostAddress": "sql1",
                "OS": "linux",
                "DefaultBackupDir": "/usr/local/dbvisit/multiplatform/backup",
                "IPAddresses": [
                    "172.22.0.6"
                ],
                "ServiceUser": "sqlsrv",
                "FileTransferListenAddress": "",
                "FileTransferListenPort": 7890
            },
            "PrimaryInstanceName": "MSSQLSERVER",
            "StandbyHost": {
                "HostAddress": "sql2",
                "OS": "linux",
                "DefaultBackupDir": "/usr/local/dbvisit/multiplatform/backup",
                "IPAddresses": [
                    "172.22.0.9"
                ],
                "ServiceUser": "sqlsrv",
                "FileTransferListenAddress": "",
                "FileTransferListenPort": 7890
            },
            "StandbyInstanceName": "MSSQLSERVER",
            "Settings": {
                "ApplicationDelayMinutes": 0,
                "StandbyMode": {
                    "UndoFilePath": "",
                    "Enabled": false
                },
                "AutomatedStandbyUpdate": {
                    "Enabled": true,
                    "IntervalSeconds": 300,
                    "BackupType": "l"
                },
                "Notifications": {
                    "To": null
                },
                "Observer": {
                    "Enabled": true,
                    "NotificationOnly": true,
                    "CheckIntervalSeconds": 60,
                    "MaxFailCount": 3,
                    "SendEmail": false,
                    "SendSlack": false,
                    "HeartbeatEnabled": false,
                    "HeartbeatHour": 7,
                    "HeartbeatMinute": 0,
                    "Rule": ""
                }
            },
            "HasFailedOver": false,
            "LicenseInfo": {
                "LicenseKey": "4jo70-qwp4l-7gplh-g1ejv-z7t8p-20tah-iodzn",
                "ExpiryDate": "2022-03-11"
            },
            "PrimaryDatabaseState": "ONLINE",
            "StandbyDatabaseState": "RESTORING",
            "ConfigurationBusy": false,
            "GapTimeSeconds": 304,
            "GapTime": "5 minutes 4 seconds"
        },
        {
            "ConfigurationId": 2,
            "ConfigurationType": "SqlServer",
            "ConfigurationName": "SQLTestDB",
            "PrimaryHost": {
                "HostAddress": "sql1",
                "OS": "linux",
                "DefaultBackupDir": "/usr/local/dbvisit/multiplatform/backup",
                "IPAddresses": [
                    "172.22.0.6"
                ],
                "ServiceUser": "sqlsrv",
                "FileTransferListenAddress": "",
                "FileTransferListenPort": 7890
            },
            "PrimaryInstanceName": "MSSQLSERVER",
            "StandbyHost": {
                "HostAddress": "sql2",
                "OS": "linux",
                "DefaultBackupDir": "/usr/local/dbvisit/multiplatform/backup",
                "IPAddresses": [
                    "172.22.0.9"
                ],
                "ServiceUser": "sqlsrv",
                "FileTransferListenAddress": "",
                "FileTransferListenPort": 7890
            },
            "StandbyInstanceName": "MSSQLSERVER",
            "Settings": {
                "ApplicationDelayMinutes": 0,
                "StandbyMode": {
                    "UndoFilePath": "",
                    "Enabled": false
                },
                "AutomatedStandbyUpdate": {
                    "Enabled": true,
                    "IntervalSeconds": 300,
                    "BackupType": "l"
                },
                "Notifications": {
                    "To": null
                },
                "Observer": {
                    "Enabled": true,
                    "NotificationOnly": true,
                    "CheckIntervalSeconds": 60,
                    "MaxFailCount": 3,
                    "SendEmail": false,
                    "SendSlack": false,
                    "HeartbeatEnabled": false,
                    "HeartbeatHour": 7,
                    "HeartbeatMinute": 0,
                    "Rule": ""
                }
            },
            "HasFailedOver": false,
            "LicenseInfo": {
                "LicenseKey": "4jo70-qwp4l-7gplh-g1ejv-z7t8p-20tah-iodzn",
                "ExpiryDate": "2022-03-11"
            },
            "PrimaryDatabaseState": "ONLINE",
            "StandbyDatabaseState": "RESTORING",
            "ConfigurationBusy": false,
            "GapTimeSeconds": 304,
            "GapTime": "5 minutes 4 seconds"
        }
    ]
}

Log Gap Report

Purpose:

Allows Running log gap report for specific configuration

...

Expand
Code Block
languagejson
{
  "Status": 200,
  "Result": {
    "log_gap_report": {
      "cascade": "N",
      "time_diff": {
        "std": "+25:35:54",
        "formatted": "+01 DAY 01:35:54"
      },
      "info": [
        {
          "source": {
            "last_transferred_timestamp": "2022-04-12 12:46:33",
            "last_transferred_seq": 549,
            "current_seq": "555",
            "archived_seq": "554"
          },
          "log_gap": {
            "apply": 5,
            "transfer": 5
          },
          "destination": {
            "recovery_seq": 550
          },
          "thread": "1"
        }
      ],
      "source": {
        "tz": "+02:00",
        "timestamp": "2022-04-13:14:22:24",
        "scn": "47102018"
      },
      "apply_delay_lag_min": "0",
      "destination": {
        "tz": "+02:00",
        "timestamp": "2022-04-12:12:46:30",
        "scn": "46986545"
      }
    },
    "ready": 0,
    "trace_file_basename": "214460_5_dbvctl_i_MEGA_202204131422.trc",
    "trace_file": "/usr/dbvisit/standbymp/oracle/trace/214460_5_dbvctl_i_MEGA_202204131422.trc",
    "pid": "214460_5",
    "done": 1
  }
}

Log Gap Report Example

For getting comprehensive JSON output results, while using API, we parse all outputs with ā€œjqā€ which can be easily installed by for example as root:

Code Block
yum install jq

In all below examples we use authentication method via ā€œ-uā€ for authentication method via cookie, check the Authentication page

To find out transfer and archive log gap for given configuration:

...