# debox85/jbos-kql architecture

> Architecture diagram of the GitHub repository debox85/jbos-kql, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-07-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/debox85/jbos-kql
- Repository: https://github.com/debox85/jbos-kql

## Overview

##### Project type and purpose
- Project type: An open-source repository of Kusto Query Language (KQL) scripts.
- Purpose: Provide a collection of ready-to-run queries for Azure Log Analytics (LA), Azure Data Explorer (ADX/Kusto), and Azure Resource Graph Explorer. Users can find, customize, and execute queries to detect certificate expirations, orphaned resources, CAP-gap detections, and other Azure diagnostics.

##### File structure
- Top-level scripts and guides:
- CAP-Gap-Detections.md
- KQL_Query_Reference_Guide.md
- README.md
- Organized subdirectories:
- “Certificate expiry/” – queries (.csl) for certificate expiration reporting, plus its own README.md
- “Orphaned Azure Resources/” – queries to find orphaned NICs, disks, etc., and its own readme.md
- Each `.csl` file is a standalone KQL script. There are no compiled binaries, no frontend, no backend services.

##### README for additional insights
- README states: “Just a bunch of KQL scripts. Includes LA, kusto, ADX & Resource Graph Explorer Queries.”

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Query Repository"
        Repo["Query Repository"]:::repo
        subgraph "Documentation"
            QRef["Query Reference Guide"]:::doc
            CAP["CAP-Gap Detections Overview"]:::doc
            README["README.md"]:::doc
        end
        subgraph "Certificate expiry"
            CE_README["README"]:::category
            CE_Q1["Expiration Date of certificates order by exp. date"]:::query
            CE_Q2["Expiration Date of certificates order with days until expiery"]:::query
            CE_Q3["Expiration Date of certificates that expire soon"]:::query
        end
        subgraph "Orphaned Azure Resources"
            OR_README["README"]:::category
            OR_Q1["Find Orphaned NICs"]:::query
            OR_Q2["Find orphaned disks"]:::query
            OR_Q3["Orphan Resources -Detailed Queries"]:::query
        end
        subgraph "Standalone Scripts"
            LA_Q1["LA Query what resources metrics send logs to given LA"]:::query
            LA_Q2["LA query datacontent , per computer,RG or Sub - Both billable and not"]:::query
            ARG_Q1["Query Resources deleted in a specific resource group"]:::query
        end
    end

    subgraph "Execution Clients"
        VSCode["VS Code (Git)"]:::client
        AzurePortal["Azure Portal Query Explorer"]:::client
        CLI_PS["Azure CLI/PowerShell"]:::client
        KustoExplorer["Kusto.Explorer"]:::client
    end

    subgraph "Azure Services"
        LA["Azure Log Analytics"]:::azureLA
        ADX["Azure Data Explorer (Kusto)"]:::azureADX
        RG["Azure Resource Graph"]:::azureRG
    end

    Repo -->|retrieves| VSCode
    Repo -->|retrieves| KustoExplorer
    Repo -->|retrieves| AzurePortal
    Repo -->|retrieves| CLI_PS

    VSCode -->|Execute KQL scripts| LA
    VSCode -->|Execute KQL scripts| ADX
    VSCode -->|Execute KQL scripts| RG

    AzurePortal -->|Execute KQL scripts| LA
    AzurePortal -->|Execute KQL scripts| ADX
    AzurePortal -->|Execute KQL scripts| RG

    CLI_PS -->|Execute KQL scripts| LA
    CLI_PS -->|Execute KQL scripts| ADX
    CLI_PS -->|Execute KQL scripts| RG

    KustoExplorer -->|Execute KQL scripts| LA
    KustoExplorer -->|Execute KQL scripts| ADX
    KustoExplorer -->|Execute KQL scripts| RG

    LA -->|"Results"| VSCode
    ADX -->|"Results"| VSCode
    RG -->|"Results"| VSCode

    LA -->|"Results"| AzurePortal
    ADX -->|"Results"| AzurePortal
    RG -->|"Results"| AzurePortal

    LA -->|"Results"| CLI_PS
    ADX -->|"Results"| CLI_PS
    RG -->|"Results"| CLI_PS

    LA -->|"Results"| KustoExplorer
    ADX -->|"Results"| KustoExplorer
    RG -->|"Results"| KustoExplorer

    click Repo "https://github.com/debox85/jbos-kql/blob/main/README.md"
    click QRef "https://github.com/debox85/jbos-kql/blob/main/KQL_Query_Reference_Guide.md"
    click CAP "https://github.com/debox85/jbos-kql/blob/main/CAP-Gap-Detections.md"
    click CE_README "https://github.com/debox85/jbos-kql/blob/main/Certificate expiry/README.md"
    click CE_Q1 "https://github.com/debox85/jbos-kql/blob/main/Certificate expiry/Expiration Date of certificates order by exp. date.csl"
    click CE_Q2 "https://github.com/debox85/jbos-kql/blob/main/Certificate expiry/Expiration Date of certificates order with days until expiery.csl"
    click CE_Q3 "https://github.com/debox85/jbos-kql/blob/main/Certificate expiry/Expiration Date of certificates that expire soon.csl"
    click OR_README "https://github.com/debox85/jbos-kql/blob/main/Orphaned Azure Resources/readme.md"
    click OR_Q1 "https://github.com/debox85/jbos-kql/blob/main/Orphaned Azure Resources/Find Orphaned NICs Kusto.csl"
    click OR_Q2 "https://github.com/debox85/jbos-kql/blob/main/Orphaned Azure Resources/Find orphaned disks kusto.csl"
    click OR_Q3 "https://github.com/debox85/jbos-kql/blob/main/Orphaned Azure Resources/Orphan Resources -Detailed  Queries.csl"
    click LA_Q1 "https://github.com/debox85/jbos-kql/blob/main/LA Query what resources metrics send logs to given LA.csl"
    click LA_Q2 "https://github.com/debox85/jbos-kql/blob/main/LA query datacontent , per computer,RG or Sub - Both billable and not.csl"
    click ARG_Q1 "https://github.com/debox85/jbos-kql/blob/main/Query Resources deleted in a specific resource group.csl"

    classDef repo fill:#f9f,stroke:#333,stroke-width:1px
    classDef doc fill:#bbf,stroke:#333,stroke-width:1px
    classDef category fill:#ddf,stroke:#333,stroke-width:1px
    classDef query fill:#eef,stroke:#333,stroke-width:1px
    classDef client fill:#bfb,stroke:#333,stroke-width:1px
    classDef azureLA fill:#ffb,stroke:#333,stroke-width:1px
    classDef azureADX fill:#bdf,stroke:#333,stroke-width:1px
    classDef azureRG fill:#fdb,stroke:#333,stroke-width:1px
```
