Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change interval of collecting date ? #271

Closed
n0405 opened this issue Sep 8, 2021 · 16 comments
Closed

How to change interval of collecting date ? #271

n0405 opened this issue Sep 8, 2021 · 16 comments

Comments

@n0405
Copy link

n0405 commented Sep 8, 2021

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 .

@n0405 n0405 changed the title How to change interval for collecting date ? How to change interval of collecting date ? Sep 8, 2021
@rschitz
Copy link
Member

rschitz commented Sep 8, 2021

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
Copy link
Author

n0405 commented Sep 10, 2021

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
Copy link
Member

rschitz commented Sep 10, 2021

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
Copy link
Author

n0405 commented Sep 12, 2021

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

@rschitz
Copy link
Member

rschitz commented Sep 12, 2021

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
Copy link
Author

n0405 commented Sep 13, 2021

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

@maomaomaopan
Copy link

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
Copy link
Member

rschitz commented Sep 15, 2021

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 #217 (comment)

@rschitz
Copy link
Member

rschitz commented Sep 15, 2021

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

@maomaomaopan
Copy link

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

@rschitz
Copy link
Member

rschitz commented Oct 24, 2021

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

@n0405
Copy link
Author

n0405 commented Oct 25, 2021

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
Copy link
Author

n0405 commented Dec 9, 2021

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
Copy link
Member

rschitz commented Dec 9, 2021

@n0405
Copy link
Author

n0405 commented Dec 14, 2021

pull exec time

How can I change this interval ?

@rschitz
Copy link
Member

rschitz commented Dec 14, 2021

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.

@n0405 n0405 closed this as completed Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants