[prometheus-users] Regarding timestamp in Prometheus using C++ library

2021-10-16 Thread PK
Hi everyone, I am using gauge metric type. Can anyone let me know, how to 
associate timestamp along with metric data in C++?

For eg: 
In Go:prometheus.*NewMetricWithTimestamp*(t,metric)
in C++ is there any API to add timestamp?

In C++ I am exposing metric like this:
sample_metric.Add({{"label","value"}}).Set(gauge_value);
 

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/7a05120f-150c-4673-bb7a-0ec41496e342n%40googlegroups.com.


[prometheus-users] LO SCHIFOSISSIMO PEDOFILO #ENNIODORIS RICICLA MOLTI SOLDI MAFIOSI: PER COSA NOSTRA, NDRANGHETA, CAMORRA, MAFIA COLOMBIANA, MAFIA RUSSA, MAFIE DI TUTTO IL MONDO. SI, CITO PROPRIO DEL

2021-10-16 Thread FRANCESCO CARBONE USEMLAB MALTA
LO SCHIFOSISSIMO PEDOFILO #ENNIODORIS RICICLA MOLTI SOLDI MAFIOSI: PER COSA 
NOSTRA, NDRANGHETA, CAMORRA, MAFIA COLOMBIANA, MAFIA RUSSA, MAFIE DI TUTTO 
IL MONDO. SI, CITO PROPRIO DEL SCOPA BAMBINE, STRA PEDOFILO ENNIO DORIS DI 
#BANCAMEDIOLANUM, CHE...MEGLIO DEFINIREI BANCA MEDIOLANUM, MAFIOLANUM, 
CAMORRANUM, NDRANGOLANUM, NAZISTANUM! CE NE SCRIVE CON TANTE PROVE, 
L'EROICO BANCHIERE SVIZZERO ANDREAS NIGG DI SAFRA SARASIN ZURICH!

MAFIA, CAMORRA, NDRANGHETA, TERRORISMO NAZISTA, STRAGI FASCISTE, MASSONERIA 
SATANISTA OMICIDA, SOLDI MALAVITOSISSIMI, PEDOFILIA KILLER E BERLUSCONISMO 
SONO DA MEZZO SECOLO, LA STESSA MERDA. SCUSATE PER MIO ITALANO IMPRECISO, 
MA SONO SVIZZERO. SONO ANDREAS NIGG DI BANCA J SAFRA SARASIN ZURICH, 
PREMIATO NEL 2018, 2019 E 2020 COME BANCHIERE SVIZZERO DELL'ANNO A BASILEA.

HO INCONTRATO VARIE VOLTE, A LUGANO, BERNA E ZURIGO, QUEL SCHIFOSO PEDOFILO 
COCAINOMANE DI ENNIO DORIS DI BANCA MEDIOLANUM. PRIMA A BANK VONTOBEL DOVE 
ERO IMPORTANTE MANAGER E POI A SAFRA SARASIN ZURICH, DOVE PURE SON 
IMPORTANTE MANAGER. IL TUTTO CON NDRANGHETISTI MEGA ASSASSINI, QUALI I 
FRATELLI #GIULIOMARTINO, #DOMENICOMARTINO E #VINCENZOMARTINO. ED INSIEME AL 
NOTO FACCENDIERE NAZI卐LEGHISTA CRIMINALISSIMO, PEDOFILO E STRA ASSASSINO 
#PAOLOBARRAI (GIÁ FINITO IN GALERA 3 VOLTE). ED ALL'AVVOCATO NAZISTA, 
KILLER E PEDERASTA #DANIELEMINOTTI DI GENOVA. PER RICICLARE CENTINAIA DI 
MLN DI EURO, CHE COLAVANO SANGUE DI MORTI AMMAZZATI PER MANO NDRANGHETISTA, 
ESATTAMENTE DELLA COSCA DE STEFANO, BEN APPUNTO, RAPPRESENTATA DAI PRIMA 
CITATI FRATELLI MARTINO, ORA IN CELLA A SAN VITTORE (IN PARTE POI LAVATI IN 
FALLITISSIMA ICO FALLITA #EIDOO).
https://www.tvsvizzera.it/tvs/al-servizio-dei-martino_il-banchiere-della--ndrangheta/44129050
https://valori.it/chiasso-dove-riciclatori-ndrine-e-criptovalute-sincontrano/
https://valori.it/banche-politica-blogger-tutti-gli-affari-dietro-le-cripto-elvetiche/
https://valori.it/criptovalute-quei-fondi-in-viaggio-tra-italia-irlanda-e-svizzera/
https://valori.it/nel-dedalo-delle-criptovalute-i-nomi-eccellenti-dentro-blockchain-invest/

NE SCRIVO IN QUESTO TESTO, DOVE INIZIO A PRENDERE IN CONSIDERAZIONE, LA 
FIGURA DELL'AVVOCATO BERLUSCONICCHIO, MASSONE, SATANISTA E PEDERASTA, CHE 
SEMPRE RAPISCE, INCULA ED AMMAZZA BAMBINI, PER POI VENDERNE GLI ORGANI O 
PER RITI MASSONICI: DANIELE MINOTTI DI GENOVA. A VOI. IAMM BELL, IÁ!
ANDREAS NIGG DI BANCA J SAFRA SARASIN ZURICH, PREMIATO NEL 2018, 2019 E 
2020 COME BANCHIERE SVIZZERO DELL'ANNO A BASILEA

PRIMA DI LASCIARVI, COME FACCIO OGNI GIORNO, UN BACIO FOCOSISSIMO, UN BACIO 
SUPER STRA HARDCORE, ALLA MIA EX PARTNER SEGRETA #MARIAPAOLATOSCHI DI 
#JPMORGAN. ERA IL 1999, NASCEVA BANCA LEONARDO. SCENDEVO DA ZURIGO E DI 
NASCOSTO INCONTRAVO MARIA PAOLA TOSCHI. PASSAVAMO WEEK END DI FUOCO, CHE A 
CONFRONTO, I FILM DI ROSSO SIFFREDI ERANO CARTONI ANIMATI PER BIMBI DI 4 
ANNI. UN BACIO ROVENTE DE VERDAD, MY EX FANTASTIC SEX PARTNER 
#MARIAPAOLATOSCHI NOW IN JP MORGAN.
ANDREAS NIGG DI BANCA J SAFRA SARASIN ZURICH, PREMIATO NEL 2018, 2019 E 
2020 COME BANCHIERE SVIZZERO DELL'ANNO A BASILEA
https://citywireselector.com/manager/andreas-nigg/d2395
https://ch.linkedin.com/in/andreasnigg

É DA ARRESTARE PRIMA CHE FACCIA UCCIDERE MOLTISSIMO ANCORA, L'AVVOCATO 
PEDOFILO, BERLUSCO卐NAZISTA, FASCIOLEGHISTA, ASSASSINO DANIELE MINOTTI 
(FACEBOOK, TWITTER) DI GENOVA E CRIMINALE STUDIO LEGALE LISI.

É DAVVERO DA FERMARE PER SEMPRE, L'AVVOCATO SATANISTA, NAZISTA, 
SATA卐NAZISTA, PEDERASTA, OMICIDA #DANIELEMINOTTI DI RAPALLO E GENOVA: 
RAPISCE, INCULA, UCCIDE TANTI BAMBINI, SIA PER VENDERNE GLI ORGANI (COME DA 
QUESTA ABERRANTE FOTO
https://www.newnotizie.it/wp-content/uploads/2016/07/Egypt-Organ-Harvesting-415x208.jpg),
CHE PER RITI MASSONICO SATANISTI CHE FA IN MILLE SETTE!
É DI PERICOLO PUBBLICO ENORME, L'AVV ASSASSINO E PEDERASTA DANIELE MINOTTI 
(FACEBOOK) DI RAPALLO E GENOVA!!! AVVOCATO STUPRANTE INFANTI ED 
ADOLESCENTI, COME PURE OMICIDA: #DANIELEMINOTTI DI CRIMINALISSIMO 
#STUDIOLEGALELISI DI LECCE E MILANO (
https://studiolegalelisi.it/team/daniele-minotti/
STUDIO LEGALE MASSONICO-CRIMINALE LISI DI LECCE E MILANO, #STUDIOLEGALELISI 
DA SEMPRE TUTT'UNO CON MEGA ASSASSINI DI MAFIA, CAMORRA, NDRANGHETA, E, 
COME DA SUA SPECIALITA' PUGLIESE, ANCOR PIÚ DI SACRA CORONA UNITA, MAFIA 
BARESE, MAFIA FOGGIANA, MAFIA DI SAN SEVERO)! É STALKER DIFFAMATORE VIA 
INTERNET, NONCHE' PEDERASTA CHE VIOLENTA ED UCCIDE BIMBI, QUESTO AVVOCATO 
OMICIDA CHIAMATO DANIELE MINOTTI! QUESTO AVVOCATO SATANISTA, NAZISTA, 
SATA卐NAZISTA, PEDOFILO E KILLER, DI RAPALLO E GENOVA (LO VEDETE A SINISTRA, 
SOPRA SCRITTA ECOMMERCE 
https://i.ytimg.com/vi/LDoNHVqzee8/maxresdefault.jpg)
RAPALLO: OVE ORGANIZZA TRAME OMICIDA E TERRORISMO DI ESTREMA DESTRA, 
INSIEME "AL RAPALLESE" DI RESIDENZA, HITLERIANO, RAZZISTA, KU KLUK 
KLANISTA, MAFIOSO E RICICLA SOLDI MAFIOSI COME SUO PADRE: 
#PIERSILVIOBERLUSCONI PIERSILVIO BERLUSCONI! SI, SI É PROPRIO COSÍ: É DA 
ARRESTARE SUBITO L'AVVOCATO SATANISTA, 

Re: [prometheus-users] Re: Prometheus using a large amount of memory when managing storage.

2021-10-16 Thread Ben Kochie
On Fri, Oct 15, 2021 at 9:51 PM Chad Sesvold  wrote:

> At this point I am the only one running queries.  When I have no target
> defined the memory seems to be flat.
>
> When I changed the follow in non-pro it seemed to stabilize the memory
> usage.
>
> --storage.tsdb.max-block-duration 15d
> --storage.tsdb.min-block-duration 1h
>

These flags will actually make memory use worse. This will generate many
more TSDB blocks than normal, which will cause Prometheus to need more
memory to manage the indexes. However this is mostly needed for page cache
memory. See my next comment.


>
> I will try copying the binaries and configs from prod to non-prod.
>
> I am planning at looking at Thanos instead of an NFS mount.  That is going
> to take some time.
>

The retention and long-term storage in Prometheus has almost no effect on
RSS needed to run Prometheus. Prometheus only needs memory (RSS) to manage
the current 2 hours of data. After 2 hours, everything in memory is flushed
to disk and mapped-in using a technique called "mmap". This means disk
blocks are virtually mapped into memory (VSS). Then the Linux kernel uses
page cache to manage what data is loaded. You can have terabytes of data in
the TSDB and it only uses a small amount of RSS to manage the mappings.

As Brian said, you need to look at go_memstats_alloc_bytes and
process_resident_memory_bytes for Prometheus. This will give you a better
idea on what is being used.


>
> I did add some file targets back in none-prod  for a total of 900 checks
> and prometheus leveled out at about 22 GB.
>
> Prod - TSDB Status - Head Stats
> Number of Series=2 million
> Number of Chunks=11million
> Number of Label=59k
> PairsCurrent Min Time=2021-10-15T16:00:00.006Z (163431366)
> Current Max Time=2021-10-15T18:51:07.414Z (1634323867414)
>
> Non-Prod - TSDB Status - Head Stats
> Number of Series=82k
> Number of Chunks=400k
> Number of Label=2k
> PairsCurrent Min Time=2021-10-15T18:05:27.705Z (1634321127705)
> Current Max Time=2021-10-15T18:50:58.200Z (1634323858200)
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CABbyFmpdpsuPDvcogdmbO3Jbga4j80pemhmhecSDpVJWeJy8Mg%40mail.gmail.com.


[prometheus-users] Re: Prometheus using a large amount of memory when managing storage.

2021-10-16 Thread Brian Candler
Is there a specific reason why you're tweaking the TSDB block durations?  
That is, did you observe some problem with the defaults?  Otherwise I'd 
suggest you just run with defaults.

In any case, if the problem you're debugging is discrepancies between prod 
and non-prod, you should be running with the same flags in both.

On Friday, 15 October 2021 at 20:51:47 UTC+1 tass...@gmail.com wrote:

> I did add some file targets back in none-prod  for a total of 900 checks 
> and prometheus leveled out at about 22 GB.
>

Not sure what you mean by "900 checks" here.  Do you mean targets? 
Metrics?  Alerting rules?

And how are you determining the total RAM usage? (If you're getting OOM 
killer messages then you're definitely hitting the RAM limit.  It's worth 
mentioning that older versions of go tended not to hand back memory to the 
OS as aggressively, but they did mark the pages as reclaimable and the OS 
would reclaim these when under memory pressure.  But recent prometheus 
binaries should be built with a recent version of go - assuming you're 
using the official release binaries and not ones you've compiled yourself)
 

> Prod - TSDB Status - Head Stats
> Number of Series=2 million
> Number of Chunks=11million
> Number of Label=59k
> PairsCurrent Min Time=2021-10-15T16:00:00.006Z (163431366)
> Current Max Time=2021-10-15T18:51:07.414Z (1634323867414)
>
> Non-Prod - TSDB Status - Head Stats
> Number of Series=82k
> Number of Chunks=400k
> Number of Label=2k
> PairsCurrent Min Time=2021-10-15T18:05:27.705Z (1634321127705)
> Current Max Time=2021-10-15T18:50:58.200Z (1634323858200)
>
>
That suggests the non-prod should be using a lot less RAM - the number of 
head chunks in particular.
 

> Prod 
> Showing nodes accounting for 3939.82MB, 73.70% of 5345.97MB total
> Dropped 292 nodes (cum <= 26.73MB)
>
> Non-prod
> Showing nodes accounting for 1.43GB, 91.54% of 1.56GB total
> Dropped 133 nodes (cum <= 0.01GB)
>

What do you mean my "nodes" here?  And what are "dropped nodes"?

I'm looking at prometheus 2.29.2 here, so maybe there are some new stats in 
2.30 that I can't see.

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/bca27a4f-7cf9-4bbc-a020-8b26a83acb38n%40googlegroups.com.