Skip to content

Very simple sql query result exporter. Only for MSSQL, another DBs is coming soon!

Notifications You must be signed in to change notification settings

Rufus111/sqlExporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

sqlExporter

Very simple sql query result exporter. Only for MSSQL, another DBs is coming soon!

So, this is not a real app, actually, it's just a script for sysadmins, who working with Prometheus.

Need's go 1.5 ot higher.

Getting Started

Just write into the queries.json file your quieries and build app.

queries.json (or another file, look at config.json) must contain a json array!

queries.json example

[
  {
    "name": "my_clients",
    "sql": "select count(*) from [my_db].[dbo].[my_clients] where [] = 0 and ([live_status] = 0 or ([live_status] = 3 and [loginTries] < 5))"
  },
  {
    "name": "my_new_24h_dynamic",
    "sql": "SELECT count(*) FROM [my_db].[dbo].[my_clients] where datediff(hour,[createDate],getDate()) < 24 and buckettype = '0'"
  },
  {
    "name": "my_dead_clients",
    "sql": "select count(*) from [my_db].[dbo].[my_store] where [client] = 0 and [live_status] = 3 and [loginTries] = 5"
  }
]

PostgreSQL and MySQL is coming soon

About

Very simple sql query result exporter. Only for MSSQL, another DBs is coming soon!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages