{
  "name": "Monitor workflow audits and failures with InfluxDB dashboard",
  "nodes": [
    {
      "id": "8ed8f8ed-5352-4eb2-a0cf-2dbbc78f2a9a",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -780,
        220
      ]
    },
    {
      "id": "001ca208-f181-4270-be91-e30a316e624b",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        300,
        -120
      ],
      "parameters": {
        "width": 1100,
        "height": 520,
        "content": "## Parse for Influx-understandable data\nInflux sample data sent via CURL is following:\n\ncurl --request POST \\\n\"http://localhost:8086/api/v2/write?org=YOUR_ORG&bucket=YOUR_BUCKET&precision=ns\" \\\n  --he"
      }
    },
    {
      "id": "e4f3e592-8c71-4c0e-998e-3bb93ee12751",
      "name": "Database Audit",
      "type": "n8n-nodes-base.n8n",
      "position": [
        -180,
        180
      ]
    },
    {
      "id": "c719a748-8048-4471-a560-7abfe1249235",
      "name": "Filesystem Audit",
      "type": "n8n-nodes-base.n8n",
      "position": [
        -180,
        360
      ]
    },
    {
      "id": "d0b36463-ee8d-4455-bffd-0217dacf3f47",
      "name": "Instance Audit",
      "type": "n8n-nodes-base.n8n",
      "position": [
        -180,
        540
      ]
    },
    {
      "id": "d17b1536-0322-443b-a431-cbb60684e399",
      "name": "Nodes Audit",
      "type": "n8n-nodes-base.n8n",
      "position": [
        -180,
        720
      ]
    },
    {
      "id": "a0750d26-f5bf-42e1-bd8b-ceb357d1c331",
      "name": "Credentials Audit",
      "type": "n8n-nodes-base.n8n",
      "position": [
        -180,
        0
      ]
    },
    {
      "id": "11e65615-0b5e-4e36-932b-3f2b335ea937",
      "name": "Split Report Data",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        440,
        200
      ]
    },
    {
      "id": "55071cff-b94b-4f15-b5ab-42a65ba90ed9",
      "name": "Prepare Influx Input Strings",
      "type": "n8n-nodes-base.set",
      "position": [
        700,
        200
      ]
    },
    {
      "id": "718a1193-1b98-4def-9a29-a81925d67e06",
      "name": "Contactenate with Commas",
      "type": "n8n-nodes-base.summarize",
      "position": [
        960,
        200
      ]
    },
    {
      "id": "bf04e182-1028-4e21-930e-8c3097fa060c",
      "name": "Pull Report Data and Risk Credentials",
      "type": "n8n-nodes-base.set",
      "position": [
        60,
        0
      ]
    },
    {
      "id": "b502d235-ddc4-49ce-8ae6-fdcfab1ca1a9",
      "name": "Pull Report Data and Risk Database",
      "type": "n8n-nodes-base.set",
      "position": [
        60,
        180
      ]
    },
    {
      "id": "fe8dfa8a-6363-49a6-808e-1feed4b627d1",
      "name": "Pull Report Data and Risk Filesystem",
      "type": "n8n-nodes-base.set",
      "position": [
        60,
        360
      ]
    },
    {
      "id": "d47b4d10-3abe-41bc-868e-4b855b9e8052",
      "name": "Pull Report Data and Risk Instance",
      "type": "n8n-nodes-base.set",
      "position": [
        60,
        540
      ]
    },
    {
      "id": "14bb0859-d7ca-4177-a833-94cb4c94990e",
      "name": "Pull Report Data and Risk Nodes",
      "type": "n8n-nodes-base.set",
      "position": [
        60,
        720
      ]
    },
    {
      "id": "852bf036-611c-416e-83d5-e926e38bb8ba",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -280,
        -120
      ],
      "parameters": {
        "width": 560,
        "height": 1020,
        "content": "## Get N8N Audits\nGet different type of audits and parse them into format that will be understandable for further processing"
      }
    },
    {
      "id": "127908d3-de5e-443b-a920-47569ea890b0",
      "name": "Influx Globals",
      "type": "n8n-nodes-base.set",
      "position": [
        -520,
        60
      ]
    },
    {
      "id": "38b364a6-7d0a-4f63-bbd8-d6bab99515a8",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        -120
      ],
      "parameters": {
        "width": 260,
        "height": 500,
        "content": "## Influx Vars\nYou will need 3 variables:\n- InfluxDB URL\n- Organization\n- Bucket name\nPut it in here"
      }
    },
    {
      "id": "545f2f20-0a55-4960-8455-c4e6323ba198",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -920,
        -120
      ],
      "parameters": {
        "width": 340,
        "height": 500,
        "content": "## Schedule Audits\nAudits don't need to be run often, but I would recommend it to be run on regular basis. This way you can see real data series in InfluxDB. I think that once a day should be enough, "
      }
    },
    {
      "id": "2beef8e7-7e88-4778-9e54-09dd9c6efca1",
      "name": "Once a Day",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -780,
        60
      ]
    },
    {
      "id": "a3408974-4c32-4900-86cf-111dd3e5f9c6",
      "name": "Get Active Workflows",
      "type": "n8n-nodes-base.n8n",
      "position": [
        -200,
        -460
      ]
    },
    {
      "id": "ef5c8f0c-07ed-447a-a582-0659fad71972",
      "name": "Get Failed Executions",
      "type": "n8n-nodes-base.n8n",
      "position": [
        -200,
        -300
      ]
    },
    {
      "id": "e842c4bd-a335-4144-b580-c92fc343d804",
      "name": "Count Active",
      "type": "n8n-nodes-base.summarize",
      "position": [
        40,
        -460
      ]
    },
    {
      "id": "e0dda14c-6d80-42fe-ae2e-1e79c8b8733b",
      "name": "Count Failed",
      "type": "n8n-nodes-base.summarize",
      "position": [
        40,
        -300
      ]
    },
    {
      "id": "a2189f25-d741-434b-bf1d-acf4567239d2",
      "name": "Merge Into One Reporting Line",
      "type": "n8n-nodes-base.merge",
      "position": [
        300,
        -440
      ]
    },
    {
      "id": "104c9d98-1d76-44c6-962e-433761e8a14f",
      "name": "Adjust Field Name",
      "type": "n8n-nodes-base.set",
      "position": [
        540,
        -440
      ]
    },
    {
      "id": "006dbe41-daab-46b4-bdf7-17af73878f80",
      "name": "Send Workflows and Fails to InfluxDB",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        800,
        -440
      ]
    },
    {
      "id": "260f51c8-f69b-4b09-96ee-23a9c83b5ac3",
      "name": "Send Audit to InfluxDB",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1200,
        200
      ]
    },
    {
      "id": "4830f6e4-efbc-4476-a515-1c4afaf6d5ec",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -280,
        -580
      ],
      "parameters": {
        "width": 1280,
        "height": 440,
        "content": "## Active Worfklows and Failed Executions\nIf you are feeling advanterous, you can also send data about workflows and executions to Influx. Since there can be a lot of executions, keep in mind to rathe"
      }
    }
  ],
  "connections": {
    "Once a Day": {
      "main": [
        [
          {
            "node": "Influx Globals",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Nodes Audit": {
      "main": [
        [
          {
            "node": "Pull Report Data and Risk Nodes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Count Active": {
      "main": [
        [
          {
            "node": "Merge Into One Reporting Line",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Count Failed": {
      "main": [
        [
          {
            "node": "Merge Into One Reporting Line",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Database Audit": {
      "main": [
        [
          {
            "node": "Pull Report Data and Risk Database",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Influx Globals": {
      "main": [
        [
          {
            "node": "Credentials Audit",
            "type": "main",
            "index": 0
          },
          {
            "node": "Nodes Audit",
            "type": "main",
            "index": 0
          },
          {
            "node": "Database Audit",
            "type": "main",
            "index": 0
          },
          {
            "node": "Filesystem Audit",
            "type": "main",
            "index": 0
          },
          {
            "node": "Instance Audit",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Failed Executions",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Active Workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Instance Audit": {
      "main": [
        [
          {
            "node": "Pull Report Data and Risk Instance",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filesystem Audit": {
      "main": [
        [
          {
            "node": "Pull Report Data and Risk Filesystem",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Adjust Field Name": {
      "main": [
        [
          {
            "node": "Send Workflows and Fails to InfluxDB",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Credentials Audit": {
      "main": [
        [
          {
            "node": "Pull Report Data and Risk Credentials",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Report Data": {
      "main": [
        [
          {
            "node": "Prepare Influx Input Strings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Active Workflows": {
      "main": [
        [
          {
            "node": "Count Active",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Failed Executions": {
      "main": [
        [
          {
            "node": "Count Failed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Audit to InfluxDB": {
      "main": [
        []
      ]
    },
    "Contactenate with Commas": {
      "main": [
        [
          {
            "node": "Send Audit to InfluxDB",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Influx Input Strings": {
      "main": [
        [
          {
            "node": "Contactenate with Commas",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Into One Reporting Line": {
      "main": [
        [
          {
            "node": "Adjust Field Name",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pull Report Data and Risk Nodes": {
      "main": [
        [
          {
            "node": "Split Report Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pull Report Data and Risk Database": {
      "main": [
        [
          {
            "node": "Split Report Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pull Report Data and Risk Instance": {
      "main": [
        [
          {
            "node": "Split Report Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pull Report Data and Risk Filesystem": {
      "main": [
        [
          {
            "node": "Split Report Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Influx Globals",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pull Report Data and Risk Credentials": {
      "main": [
        [
          {
            "node": "Split Report Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}