Mar 8, 2026

Prometheus NSSM Windows Exporter and Grafana

prometheus.exe --config.file=prometheus.yml

Access is denied.


https://wingetgui.com/apps/Prometheus-WMIExporter?utm_source=chatgpt.com


cd C:\Prometheus

prometheus.exe --config.file=prometheus.yml



http://localhost:9090

  

Download NSSM   

--Correct command

R:\nssm-2.24\win64\nssm.exe install prometheus


Path

C:\Prometheus\prometheus.exe


Startup Dir 

C:\Prometheus


Argument 

--config.file=prometheus.yml


R:\nssm-2.24\win64\nssm.exe install prometheus C:\Prometheus\prometheus.exe --config.file=C:\Prometheus\prometheus.yml


--Final Architecture

----------------------------------

Windows Server

      ↓

Windows Exporter (9182)

      ↓

Prometheus (9090)

      ↓

Grafana (3000)

      ↓

Monitoring Dashboard

----------------------------------


windows_exporter-0.24.0-amd64.msi


2️⃣ Select collectors (recommended)


Enable:

cpu

memory

logical_disk

net

os

service

system

Default port 9182


http://localhost:9182/metrics


Add to Prometheus

scrape_configs:

  - job_name: "windows"

    static_configs:

      - targets: ["192.168.1.10:9182"]

  

Test in Prometheus


Open Prometheus UI and run query:


windows_cpu_time_total   


If you are monitoring multiple Windows servers, install windows_exporter on each server.

Sep 28, 2025

Azure DTU

 In Azure SQL Database, DTU stands for Database Transaction Unit — it’s a performance metric that combines CPU, memory, reads, and writes into a single measure.


Think of it as a “power level” — the higher the DTU, the more workload the database can handle.




How to Check DTU Usage

You can monitor DTU utilization via:

Azure Portal → SQL Database → Monitoring → DTU usage (%)

Query via T-SQL

SELECT * FROM sys.dm_db_resource_stats ORDER BY end_time DESC;

You can estimate your DTU requirement using Microsoft’s DTU Calculator:

https://dtucalculator.azurewebsites.net


Jul 10, 2025

fn_my_permissions

 fn_my_permissions ( securable , 'securable_class' )

Value Description
DATABASE   Permissions on the current database
OBJECT Table, View, Stored Procedure, etc.
SCHEMA Database schema
SERVER Server-level permissions

SELECT * FROM fn_my_permissions(NULL, 'DATABASE');

SELECT * FROM fn_my_permissions(NULL, 'SERVER');

SELECT * FROM fn_my_permissions('dbo.YourTableName', 'OBJECT');