# No nginx metric graphs

**URL:** <https://discuss.elastic.co/t/no-nginx-metric-graphs/265330>\
**Category:** Metrics\
**Created:** [February 24, 2021, 11:35am UTC](https://discuss.elastic.co/t/no-nginx-metric-graphs/265330 "2021-02-24T11:35:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![fortega](https://avatars.discourse-cdn.com/v4/letter/f/e495f1/32.png) [@fortega](https://discuss.elastic.co/u/fortega)\
**Post date:** [February 24, 2021, 11:35am UTC](https://discuss.elastic.co/t/no-nginx-metric-graphs/265330/1 "2021-02-24T11:35:17Z")

</div>

Hi. I have installed metricbeat on the Nginx server to send the data to the ELK server. I have loaded the dashboards but no data appears in the graphs.  
The version used by Metricbeat and ELK is 1.10.1 and Nginx is 1.16.1.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/9/d91c719d6fa76adeec10d403449b62b04f162df0.png)

The nginx module file:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/9/49d6bcafd7cb10ef2d320c055a91910c2ba918b6.png)

I followed the next guide: [Cómo monitorear los servidores web NGINX con el Elastic Stack | Elastic Blog](https://www.elastic.co/es/blog/how-to-monitor-nginx-web-servers-with-the-elastic-stack)

---

<div class="post-metadata">

**Author:** ![simianhacker](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simianhacker/32/3383_2.png) [@simianhacker](https://discuss.elastic.co/u/simianhacker)\
**Post date:** [February 24, 2021, 3:41pm UTC](https://discuss.elastic.co/t/no-nginx-metric-graphs/265330/2 "2021-02-24T15:41:11Z")

</div>

Can you do me a favor and run this in the Developer console in Kibana?

```auto
GET _cat/indices

```

Are there any results that show up in Discover? For those built in Dashboards, there should already be an index pattern that matches `metricbeat-*`

---

<div class="post-metadata">

**Author:** ![fortega](https://avatars.discourse-cdn.com/v4/letter/f/e495f1/32.png) [@fortega](https://discuss.elastic.co/u/fortega)\
**Post date:** [February 25, 2021, 7:45am UTC](https://discuss.elastic.co/t/no-nginx-metric-graphs/265330/3 "2021-02-25T07:45:27Z")

</div>

Hi Simianhacker,

This is the result in the Dev console:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/3/f321083d6ff506cc899ce6581f0e44ba64de0554.jpeg)  
The line 21 shows "yellow open metricbeat-2021.02"

System Dashboard works but Nginx Dashboard not.

Regards.

---

<div class="post-metadata">

**Author:** ![simianhacker](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simianhacker/32/3383_2.png) [@simianhacker](https://discuss.elastic.co/u/simianhacker)\
**Post date:** [February 25, 2021, 4:40pm UTC](https://discuss.elastic.co/t/no-nginx-metric-graphs/265330/4 "2021-02-25T16:40:40Z")

</div>

Let's see if there is any Nginx data by running this query:

```auto
POST metricbeat-*/_search
{
  "size": 0, 
  "query": {
    "bool": {
      "filter": [
        {
          "range": {
            "@timestamp": {
               "gte": "now-15m",
                "lte": "now"
            }
          }
        },
        {
          "match_phrase": {
            "event.module": "nginx"
          }
        }
      ]
    }
  }
}

```

Then look at the `hits.total.value` path, it should not be zero.

Can you log into one of the servers and try making a curl request using the combination of values from the `hosts` setting and `server_status_path`? So for the configuration you posted, log on to the same machine and run:

```auto
curl -k -XGET https://wso2ei/server-status

```

Finally, are there any logs form the Metricbeat process? Or can you run it live on the machine adding the `-e` flag like so: `./metricbeat -e`. That command will spit out the logs to the console and make it easier to debug.

---

<div class="post-metadata">

**Author:** ![fortega](https://avatars.discourse-cdn.com/v4/letter/f/e495f1/32.png) [@fortega](https://discuss.elastic.co/u/fortega)\
**Post date:** [February 26, 2021, 11:36am UTC](https://discuss.elastic.co/t/no-nginx-metric-graphs/265330/5 "2021-02-26T11:36:34Z")

</div>

You are right, `hits.total.value` path is not 0.

> {  
> "took" : 0,  
> "timed\_out" : false,  
> "\_shards" : {  
> "total" : 4,  
> "successful" : 4,  
> "skipped" : 0,  
> "failed" : 0  
> },  
> "hits" : {  
> "total" : {  
> "value" : 90,  
> "relation" : "eq"  
> },  
> "max\_score" : null,  
> "hits" :   
> }  
> }

I did some changes in Nginx and that all traffic is balanced to /carbon/admin/login.jsp. So I changed the module file.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/d/6d3f3ce418681c070ac0389da76404676d7a2b18.png)

curl output:  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/d/9d31a1052417beabe50d56b48446d405bcb01d89.png)

The command `metricbeat run -e` doesn't show any error.

---

<div class="post-metadata">

**Author:** ![fortega](https://avatars.discourse-cdn.com/v4/letter/f/e495f1/32.png) [@fortega](https://discuss.elastic.co/u/fortega)\
**Post date:** [March 3, 2021, 2:05pm UTC](https://discuss.elastic.co/t/no-nginx-metric-graphs/265330/6 "2021-03-03T14:05:33Z")

</div>

I resolved the issue. I added `allow all` in nginx.conf in the location /nginx\_status  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/5/451aa61cdcd8eebfe86e931da4b6bdc347c1b353.png)

Then I changed again the nginx module file to `server_status_path : "/nginx_status"` and reload both services.  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/4/44071ba38f2c96682a516e96665d3f60e055acc7.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/9/09c94d77f1694bc3b1492868cc0cc82f080e7ad8.png)

Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 31, 2021, 2:05pm UTC](https://discuss.elastic.co/t/no-nginx-metric-graphs/265330/7 "2021-03-31T14:05:40Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
