<p>You need to collect static assets in your Django</p>

<pre><code>cd /opt/graphite/webapp &amp;&amp; PYTHONPATH=/opt/graphite/webapp django-admin.py collectstatic --noinput --settings=graphite.settings
</code></pre>

<p>Static files will be installed in <strong>/opt/graphite/static</strong>.
Then you need to configure your webserver to serve them directly.
For Nginx something like:</p>

<pre><code>location /static {
   root /opt/graphite
}
</code></pre>

CC BY-SA 3.0
2017-07-07T14:57:04.450Z
Are you sure they are even using nginx? My understanding is that graphite runs on [apache by default](http://graphite.readthedocs.io/en/latest/config-webapp.html)
James Shewey
CC BY-SA 3.0
2017-07-07T16:16:28.423Z
That is exactly correct. For those who come after me, the symptom of this problem is precisely what I described (the blank screen but functional header), and also the browser console displayed many 404's - all the js and css that builds the content of the page is static files which were not able to be found.) For some reason, `python-whitenoise` which I was using for static files was failing silently. Running the command as suggested here worked, of course. BUT - the STATIC_ROOT by default is `/opt/graphite/static`, so that is what you should point your webserver to (NOT `/opt/graphite`).
fildred13
CC BY-SA 3.0
2017-07-07T22:31:53.507Z
@fildred13 @james-shewey : yes, sorry, should mention Apache as well - but I have no example of Apache config. Please note that Nginx config above is from working configuration, it's pointing static files exactly to `/opt/graphite/static`
deniszh
CC BY-SA 3.0
2017-07-07T10:39:02.610Z
2017-07-07T10:39:02.610Z
deniszh
<p>I have used 0.9.x Graphite in the past as the basis of my monitoring system, and am trying a fresh install of 1.0.1 prior to upgrading across my systems (Ubuntu, 14.04, though I doubt that matters).</p>

<p>I appear to have graphite-webapp and carbon-cache running (<code>supervisorctl</code> reports both as <code>RUNNING</code>, and there are not errors in any logs I can find). I have confirmed by navigating in the server <code>/opt/graphite/webapp/storage/whisper/</code> that there is in fact data to display in the first place.</p>

<p>I am able to access <a href="http://localhost:8080" rel="nofollow noreferrer">http://localhost:8080</a> and see the usual graphite webapp header, but the body of the page is blank (where normally I would expect to see the file-browser that lets me choose data on the left, and it graphs the selected data on the right).</p>

<p>To the best of my knowledge, I have configured graphite as per the installation instructions, but obviously I have done something wrong.</p>

<p>If there are particular configuration files that would be useful for me to include (which can also server as a debugging path for future people who may have this issue), please comment the files that may help.</p>

<p>Note to editor: The tag should be "graphite", probably, but I don't have the rep to tag it correctly.</p>

CC BY-SA 3.0
2017-07-07T00:41:57.273Z
What does /var/log/httpd/error_log show? Can you post the header with `curl -i http://localhost:8080`?
James Shewey
CC BY-SA 3.0
2017-07-07T17:54:14.220Z
Also check the browser error console to see if there are 404s, etc.
Xiong Chiamiov
<monitoring>
Why would graphite-webapp browser not display any body content?
fildred13
# Why would graphite-webapp browser not display any body content?

(Asked by: username_0 on 2017-07-06)

I have used 0.9.x Graphite in the past as the basis of my monitoring system, and am trying a fresh install of 1.0.1 prior to upgrading across my systems (Ubuntu, 14.04, though I doubt that matters).

I appear to have graphite-webapp and carbon-cache running (`supervisorctl` reports both as `RUNNING`, and there are not errors in any logs I can find). I have confirmed by navigating in the server `/opt/graphite/webapp/storage/whisper/` that there is in fact data to display in the first place.

I am able to access <http://localhost:8080> and see the usual graphite webapp header, but the body of the page is blank (where normally I would expect to see the file-browser that lets me choose data on the left, and it graphs the selected data on the right).

To the best of my knowledge, I have configured graphite as per the installation instructions, but obviously I have done something wrong.

If there are particular configuration files that would be useful for me to include (which can also server as a debugging path for future people who may have this issue), please comment the files that may help.

Note to editor: The tag should be "graphite", probably, but I don't have the rep to tag it correctly.

**Tags:** monitoring

> **Comments:**
> **username_1**: What does /var/log/httpd/error_log show? Can you post the header with `curl -i http://localhost:8080`?  
> **username_2**: Also check the browser error console to see if there are 404s, etc.  

---

## 1 answers

### Answer by username_3 on 2017-07-07. Score: 3 | Accepted answer

You need to collect static assets in your Django
cd /opt/graphite/webapp && PYTHONPATH=/opt/graphite/webapp django-admin.py collectstatic --noinput --settings=graphite.settings

Static files will be installed in /opt/graphite/static.
Then you need to configure your webserver to serve them directly.
For Nginx something like:
location /static {
   root /opt/graphite
}

> **Comments:**
> **username_1**: Are you sure they are even using nginx? My understanding is that graphite runs on [apache by default](http://graphite.readthedocs.io/en/latest/config-webapp.html)  
> **username_0**: That is exactly correct. For those who come after me, the symptom of this problem is precisely what I described (the blank screen but functional header), and also the browser console displayed many 404's - all the js and css that builds the content of the page is static files which were not able to be found.) For some reason, `python-whitenoise` which I was using for static files was failing silently. Running the command as suggested here worked, of course. BUT - the STATIC_ROOT by default is `/opt/graphite/static`, so that is what you should point your webserver to (NOT `/opt/graphite`).  
> **username_3**: @username_0 @james-shewey : yes, sorry, should mention Apache as well - but I have no example of Apache config. Please note that Nginx config above is from working configuration, it's pointing static files exactly to `/opt/graphite/static`  

---

