I am new to prometheus so did some researched and found that it is helpful for monitoring application there are lot of examples of increasing counter to check api calls. My use case is somewhat different, I have a Rest API which is connecting to database executing query and returning data in JSON format. For example:
{
"dskreads": 26815,
"bufreads": 14451041,
"dskwrites": 52471,
"bufwrites": 569468,
"isamtot": 18439806,
"isopens": 432586,
"isstarts": 408604,
"isreads": 6962799,
"iswrites": 80438,
"isrewrites": 54535,
"isdeletes": 54469,
"iscommits": 61673,
"isrollbacks": 0,
"latchwts": 190,
"buffwts": 192,
"lockreqs": 13921801,
"lockwts": 0,
"ckptwts": 7,
"deadlks": 0,
"lktouts": 0,
"numckpts": 106,
"plgpagewrites": 11106,
"plgwrites": 460,
"llgrecs": 552829,
"llgpagewrites": 49076,
"llgwrites": 43672,
"pagreads": 76446,
"pagwrites": 68495,
"flushes": 107,
"compress": 15039,
"fgwrites": 0,
"lruwrites": 0,
"chunkwrites": 8195,
"btraidx": 1627,
"dpra": 3933,
"rapgs_used": 4755,
"seqscans": 16008,
"totalsorts": 6691,
"memsorts": 4612,
"disksorts": 2079,
"maxsortspace": 224
}
Now I want to register my API to Prometheus so that it continuously polls the above data and shows it in graphical format.