Giter Club home page Giter Club logo

Comments (6)

sara4dev avatar sara4dev commented on August 30, 2024 3

I also faced the same error. I had to include these two lines at the top of the nginx.conf, and that solved it.

load_module modules/ndk_http_module.so;
load_module modules/ngx_http_lua_module.so;

from nginx-lua-prometheus.

SeanQuinn781 avatar SeanQuinn781 commented on August 30, 2024 2

I also faced the same error. I had to include these two lines at the top of the nginx.conf, and that solved it.

load_module modules/ndk_http_module.so;
load_module modules/ngx_http_lua_module.so;

Thanks worked for me

from nginx-lua-prometheus.

knyar avatar knyar commented on August 30, 2024

The most likely reason is that you don't have the lua module enabled.

from nginx-lua-prometheus.

anishvarghese avatar anishvarghese commented on August 30, 2024

I am using nginx 1.14 with Ubuntu 18. I sued the command suggested in your Readme and confirmed the modules are there in the module directory but it still showing this issue

root@prod:/usr/share/nginx/modules# ls -al
total 752
drwxr-xr-x 2 root root   4096 Feb  8 08:39 .
drwxr-xr-x 3 root root   4096 Dec  5 10:51 ..
-rw-r--r-- 1 root root  14440 Nov  6 18:54 ndk_http_module.so
-rw-r--r-- 1 root root  20232 Nov  6 18:54 ngx_http_geoip_module.so
-rw-r--r-- 1 root root  23472 Nov  6 18:54 ngx_http_image_filter_module.so
-rw-r--r-- 1 root root 413520 Nov  6 18:54 ngx_http_lua_module.so
-rw-r--r-- 1 root root  19304 Nov  6 18:54 ngx_http_xslt_filter_module.so
-rw-r--r-- 1 root root  99720 Nov  6 18:54 ngx_mail_module.so
-rw-r--r-- 1 root root 163272 Nov  6 18:54 ngx_stream_module.so

from nginx-lua-prometheus.

anishvarghese avatar anishvarghese commented on August 30, 2024

enabled the module and fixed the issue now getting this
root@prod:/usr/share/nginx/modules# nginx -t
nginx: [error] [lua] prometheus.lua:271: init(): Dictionary 'prometheus_metrics' does not seem to exist. Please define the dictionary using lua_shared_dict.
nginx: [error] [lua] prometheus.lua:316: counter(): Prometheus module has not been initialized
nginx: [error] [lua] prometheus.lua:384: histogram(): Prometheus module has not been initialized
nginx: [error] [lua] prometheus.lua:349: gauge(): Prometheus module has not been initialized
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

from nginx-lua-prometheus.

smac89 avatar smac89 commented on August 30, 2024

Note: You should specify the full path to the module if they are not located in the $NGINX_PREFIX (ex. /etc/nginx)

from nginx-lua-prometheus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.