send logs to mount point in Graphite

Asked by kumar

HI .
I had installed Graphite in Centos by refereeing "http://www.unixmen.com/install-graphite-centos-7/" and everything is working fine.

Now i need to change the logs path to attached volume.So, when looked into " /opt/graphite/conf/carbon.conf" found below lines:

 STORAGE_DIR = $GRAPHITE_STORAGE_DIR
# LOCAL_DATA_DIR = STORAGE_DIR/whisper/
# WHITELISTS_DIR = STORAGE_DIR/lists/
# CONF_DIR = STORAGE_DIR/conf/
# LOG_DIR = STORAGE_DIR/log/
# PID_DIR = STORAGE_DIR/

I guess i can change the path, in line "# LOG_DIR= STORAGE_DIR/log/" to "LOG_DIR = mounted_point/log/" by stop/start service.

I am doing this because ,the server will not run out of disk, as logs are getting stored in mounted volume.
Please correct me ,if i am wrong.

Thanks in advance.

Question information

Language:
English Edit question
Status:
Solved
For:
Graphite Edit question
Assignee:
No assignee Edit question
Solved by:
kumar
Solved:
Last query:
Last reply:
Revision history for this message
Denis Zhdanov (deniszhdanov) said :
#1

You're right. Just check that your mountpoint file ownership/permissions will allow carbon user to write logs there.

Revision history for this message
kumar (dvrkittu) said :
#2

Thanks for Confirming.

I had mounted the log directory to mountpoint/log.
I changed permission also.

We have carbon-cache/carbon-cache-a and webapp folders in log directory.

When mounted done ,i could see only carbon-cache-a folder gets updated and webapp folder logs are not getting update,rather webapp folder gets still updated in /opt/graphite/storage/log/webapp.

Please let me know why such behaviour for webapp logs.
Thanks in advance

Revision history for this message
kumar (dvrkittu) said :
#3

--continuous to above question

HI ,

I need to know the path ,Where carbon writes data,So i can replace that path to mount point.

Please help me .

Revision history for this message
Denis Zhdanov (deniszhdanov) said :
#4

Sorry, Kumar, I do not really understand what you mean. If you are asking where graphite store its whisper files it is /opt/graphite/storage/whisper by default. In your case, you can move whole /opt directory to new mountpoint and do not touch anything else.

Revision history for this message
kumar (dvrkittu) said :
#5

Thanks Denis !!

My need is store data and logs in mount point.

For carbon logs ,this is path "/opt/graphite/storage/log/carbon-cache/carbon-cache-a/" .

For whisper logs,this is path "/opt/graphite/storage/whisper"

For webapp logs ,this is path "/opt/graphite/storage/log/webapp"

Also carbon stores data using whisper ,so i need to confirm where it stores .So that i can push it to mount point.

In short my need is:
1.where is data saving?
2.replace that storing path with mounted path

As you said ,if i move whole /opt directory ,i will get whole graphite in mount point. That is installation will be in root volume and whole data will be in mounted volume .Please correct if i am wrong

Please suggest the feasible solution.

Revision history for this message
kumar (dvrkittu) said :
#6

HI,

I mounted whisper/carbon-cache logs to mount point with all suitable permissions.

Issue i am facing is:

Though i can see in whisper ,the metrics but in Graphite UI ,I cannot see anything.

And so removed the mount point and allowed as it was earlier,then i can see the metrics in graphite UI.

Not sure what's going wrong.Please suggest.

Revision history for this message
kumar (dvrkittu) said :
#7

Thnak's It got resolved