【问题标题】:Rundeck Step Level StatisticsRundeck 阶梯级统计
【发布时间】:2022-10-20 23:39:37
【问题描述】:

Rundeck 提供了大量关于其正在运行的作业的统计数据。 示例:平均执行时间、成功率、当作业执行时间长于平均时间时发送通知的能力等。

有没有办法在步骤级别上进行类似的统计?

【问题讨论】:

    标签: notifications statistics execution-time rundeck


    【解决方案1】:

    目前在步骤级别不存在那种静态,但您可以在执行时“看到更多”。

    为此,在调试模式下运行作业:在运行作业之前,检查绿色的“立即运行作业”按钮并单击左侧的三角形,然后选择“使用调试输出运行”,然后运行作业。

    通过这种方式,您可以在作业输出中看到所有内部流程(例如:创建选项、环境变量等)。

    【讨论】:

      【解决方案2】:

      我能够从此 API 调用中提取有关先前执行的步骤的相关信息:

      https://docs.rundeck.com/docs/api/rundeck-api.html#execution-state

      例子

      {
      "executionId": 1058,
      "serverNode": "localhost",
      "nodes": {
          "localhost": [
              {
                  "executionState": "FAILED",
                  "stepctx": "1"
              }
          ],
          "SCZ-Env1": [
              {
                  "executionState": "NOT_STARTED",
                  "stepctx": "2"
              },
              {
                  "executionState": "NOT_STARTED",
                  "stepctx": "3"
              }
          ]
      },
      "executionState": "FAILED",
      "updateTime": "2022-10-11T08:29:34Z",
      "startTime": "2022-10-11T08:29:19Z",
      "completed": true,
      "endTime": "2022-10-11T08:29:34Z",
      "allNodes": [
          "SCZ-Env1"
      ],
      "stepCount": 3,
      "steps": [
          {
              "duration": 14923,
              "parameterStates": {},
              "executionState": "FAILED",
              "stepctx": "1",
              "startTime": "2022-10-11T08:29:19Z",
              "updateTime": "2022-10-11T08:29:34Z",
              "id": "1",
              "endTime": "2022-10-11T08:29:34Z",
              "nodeStates": {
                  "localhost": {
                      "duration": 14923,
                      "meta": {
                          "failureReason": "PluginFailed"
                      },
                      "executionState": "FAILED",
                      "startTime": "2022-10-11T08:29:19Z",
                      "updateTime": "2022-10-11T08:29:34Z",
                      "endTime": "2022-10-11T08:29:34Z"
                  }
              },
              "nodeStep": false
          },
          {
              "duration": -1,
              "parameterStates": {},
              "executionState": "NOT_STARTED",
              "stepctx": "2",
              "startTime": null,
              "updateTime": null,
              "id": "2",
              "endTime": "2022-10-11T08:29:34Z",
              "nodeStates": {
                  "SCZ-Env1": {
                      "duration": -1,
                      "executionState": "NOT_STARTED",
                      "startTime": null,
                      "updateTime": null,
                      "endTime": "2022-10-11T08:29:34Z"
                  }
              },
              "nodeStep": true
          },
          {
              "duration": -1,
              "parameterStates": {},
              "executionState": "NOT_STARTED",
              "stepctx": "3",
              "startTime": null,
              "updateTime": null,
              "id": "3",
              "endTime": "2022-10-11T08:29:34Z",
              "nodeStates": {
                  "SCZ-Env1": {
                      "duration": -1,
                      "executionState": "NOT_STARTED",
                      "startTime": null,
                      "updateTime": null,
                      "endTime": "2022-10-11T08:29:34Z"
                  }
              },
              "nodeStep": true
          }
      ],
      "targetNodes": [
          "SCZ-Env1"
      ]
      

      }

      【讨论】:

        猜你喜欢
        • 2012-01-02
        • 2020-11-23
        • 1970-01-01
        • 2017-12-24
        • 1970-01-01
        • 2014-12-04
        • 2021-10-11
        • 2021-05-31
        • 1970-01-01
        相关资源
        最近更新 更多