Comments (6)
Try using: -mongodb.uri mongodb://root:example@mongo:27017
from mongodb_exporter.
@mostafaghadimi - have you been able to make this work . ! I still have issue not getting full spectrum of mongo metrics through exporter .
from mongodb_exporter.
@pauldintel Yes, I did. Please share the details about how you deploy your applications. In case of using Docker, there might be network related issues.
from mongodb_exporter.
hi @mostafaghadimi thanks for offering the help . I am using mongo7.0.5, prometheus , nodeexporter , grafana and mongodb exporter in docker container (all inside same network bridge) .
Below is the docker specification :
mongodb-exporter:
hostname: mongodb-exporter
container_name: mongodb-exporter
image: mongoexport:prom
command: ./mongodb_exporter-linux-amd64 -logtostderr -mongodb.uri mongodb://admin1:password@mongo1:27017/mydb -groups.enabled 'asserts,durability,background_flusshing,connections,extra_info,global_lock,index_counters,network,op_counters,op_counters_repl,memory,locks,metrics'
restart: always
ports:
- 9001:9001
networks:
mongo_network:
Please note above mongo1 is the container name and mydb is the db name . the exporter linux utility is used in command line.
the issue with the above is I am getting Authentication failed error : the prometheus portal shows mongo exporter is up and running on 9001 port and no issue . But just shows couple of http# metrics and nothing on mongo metrics shown . So my gut feeling is this is because mongo authentication failure.
Generally at this moment my thought is those user/password needs to be preexisting on the database. Once I create them in database with admin roles I started getting Panic error plus mongo exporter shows down in prometheus ..
So at this moment it is being very strange ! I want to use Grafana dashboard comes pre-shipped with mongo metrics that works on exporter and stuck on implementing that solution.
from mongodb_exporter.
@pauldintel you're welcome. I think you can create user with environment variables and would you please also share your mongodb service in docker-compose file details?
from mongodb_exporter.
@pauldintel take a look if this is relevant: #110
I had the same message: panic: runtime error: invalid memory address or nil pointer dereference
I patched according to this comment and it worked.
from mongodb_exporter.
Related Issues (20)
- Read config from JSON or YAML file HOT 2
- I got a error: ..... no reachable servers HOT 1
- Failed to get server status and metrics cannot be obtained HOT 1
- Is mongodb_exporter supports Windows OS also?
- Unable to comply with mongodb 4.2.2, error: panic: runtime error: invalid memory address or nil pointer dereference HOT 9
- Unauthorized error on hidden node HOT 1
- Unauthorized error of disconnected MongoDB replica set
- can't make build
- mongodb exporter crashes HOT 3
- Failed to get server status. panic: collector has no descriptors HOT 2
- Is mongodb_exporter supports Windows OS also?
- How to specify port other than 9001?
- panic: runtime error: invalid memory address or nil pointer dereference HOT 6
- still maintained?
- Can't build docker image HOT 1
- Cannot connect to MongoDB: server selection error: context canceled, current topology HOT 1
- Kubernetes support
- build error?help/(ćoć)/~~
- Dead project? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mongodb_exporter.