sexibytes / sexigraf

SexiGraf is a vSphere centric Graphite appliance with a Grafana frontend.
http://www.sexigraf.fr
MIT License
128 stars 21 forks source link

How to change interval of collecting date ? #271

Closed n0405 closed 2 years ago

n0405 commented 3 years ago

first to say SexyGraf is very nice monitorg tool for esxi .

I am looking , but with no sucess , to change interval of collecting data from 5 minutes to 1 minut .

rschitz commented 3 years ago

Hi, Thanks for your support. To do that you'd need to change the carbon schema, the perfmanager queries and the cron tab. I can tell you what to do but can i ask you what you need first and your env size pls?

n0405 commented 3 years ago

Hi , my env size is 35 servers I need to get data more frequent , for instance if is selected period for last 5 minutes on graph it shows only one values , and it will be nice that show a line of values for every minutes in that period . image

rschitz commented 3 years ago

There is 2 aspects about this request. First, for how long you need this 1min granularity because the default 5min granularity is kept for 48h, after that it decrease for space an efficiency. Second, for which metrics you need that because some metrics come from properties and may not be refreshed every minute.

n0405 commented 3 years ago

I suppose that one month will be enough, but only metrics regard to VMs and Host in cluster usage,

rschitz commented 3 years ago

1 month @1min is huge, you sure you need that much? here is the default for reference : retentions = 5m:24h,10m:48h,80m:7d,4h:30d,12h:90d,48h:1y,96h:2y,288h:5y

n0405 commented 3 years ago

yes , it is . but I need more data about cpu utilizacion , cpu ready

maomaomaopan commented 3 years ago

Hi, SexyGraf is very nice monitorg tool. I have a same question, I want to see past 30 days data at 10minute intervals. so I changed config file (/opt/graphite/conf/storage-schemas.conf), but no success

[anything_else]
pattern = .*
retentions = 5m:24h,10m:48h,80m:7d,240m:30d,720m:90d,2880m:1y,5760m:2y,17280m:5y
↓ 
retentions = 5m:24h,10m:48h,10m:7d,10m:30d,80m:90d,2880m:1y,5760m:2y,17280m:5y

Do you have any ideas?

rschitz commented 3 years ago

Hi @maomaomaopan and thanks for your support. This will only be applied to the NEW whisper files so you have to delete your files so they will be recreated with the correct schema or you change the existing one with a command like this https://github.com/sexibytes/sexigraf/issues/217#issuecomment-639355527

rschitz commented 3 years ago

@Nzaca i'm currently rewriting the vSphere collection part so let me try to figure something out

maomaomaopan commented 3 years ago

Hi @rschitz ! It worked as I was looking for Thanks for your support!

rschitz commented 3 years ago

@Nzaca check the sexigraf pull exec time dashboard and how much time it takes to exec your actual pull?

n0405 commented 3 years ago

Hi @rschitz I checked and it's take 10s and happens every 5m. last week I try with nohup /usr/bin/find -L /mnt/wfs/whisper/vmw/ -type f ( -name '*.wsp' ) -exec /usr/local/bin/whisper-resize.py {} 1m:24h,5m:48h,60m:7d,120m:30d,720m:90d,2880m:1y,5760m:2y,17280m:5y --nobackup \; & and also change retentions in /opt/graphite/conf/storage-schemas.conf retentions = 1m:24h,5m:48h,60m:7d,120m:30d,720m:90d,2880m:1y,5760m:2y,17280m:5y but I didn't notice any change

n0405 commented 2 years ago

Hi @rschitz , after a while I deal with these intervals again. I stoped the service carbon-cache and execute nohup /usr/bin/find -L /mnt/wfs/whisper/vmw/ -type f ( -name '*.wsp' ) -exec /usr/local/bin/whisper-resize.py {} 1m:24h,1m:48h,5m:7d,60m:30d,60m:90d,60m:1y --nobackup \; & and notice in nohup.out that indicate that my retention isn't good . So maybe that is problem from beginning

Traceback (most recent call last): File "/usr/local/bin/whisper-resize.py", line 4, in import('pkg_resources').run_script('whisper==1.1.7', 'whisper-resize.py') File "/usr/local/lib/python3.5/dist-packages/pkg_resources/init.py", line 650, in run_script self.require(requires)[0].run_script(script_name, ns) File "/usr/local/lib/python3.5/dist-packages/pkg_resources/init.py", line 1446, in run_script exec(code, namespace, namespace) File "/usr/local/lib/python3.5/dist-packages/whisper-1.1.7-py3.5.egg/EGG-INFO/scripts/whisper-resize.py", line 69, in for retentionDef in args[1:]] File "/usr/local/lib/python3.5/dist-packages/whisper-1.1.7-py3.5.egg/EGG-INFO/scripts/whisper-resize.py", line 69, in for retentionDef in args[1:]] File "/usr/local/lib/python3.5/dist-packages/whisper-1.1.7-py3.5.egg/whisper.py", line 176, in parseRetentionDef raise ValueError("Invalid retention specification '%s'" % points) ValueError: Invalid retention specification '24h,1m:48h,5m:7d,60m:30d,60m:90d,60m:1y'

rschitz commented 2 years ago

Hi @Nzaca check this : https://graphite.readthedocs.io/en/latest/config-carbon.html#storage-schemas-conf

n0405 commented 2 years ago

pull exec time

How can I change this interval ?

rschitz commented 2 years ago

In the /etc/cron.d/vi_* but it won't be accurate since the script is configured to catch the 15 latest 20sec metrics (5min total) and compute the median. In order to execute every 1min it would need lot of changes.