MongoDB-Cowboys / Monalize

Monaliza is a tool for scanning and analyzing MongoDB database for any performance issues, which lead to high CPU consumption.
GNU General Public License v3.0
28 stars 6 forks source link

`bash: mongo: command not found` #6

Closed yeroc-sebrof closed 2 years ago

yeroc-sebrof commented 2 years ago
...
5- Database: admin
6- Database: local
Search slow query...
2022/07/04 15:43:37 error: exit status 127
--- stdout ---

--- stderr ---
bash: mongo: command not found

Monitoring logs mongodb...
2022/07/04 15:43:37 error: exit status 1
--- stdout ---

--- stderr ---
cat: /var/log/mongodb/mongodb.log: No such file or directory

History cleaned
Done

I was running this out of the buster golang container with mongo-cli installed:

# Running this from the repo dir
docker run --rm -it -v ${PWD}:/app golang:buster
wget https://fastdl.mongodb.org/mongocli/mongocli_1.25.0_linux_arm64.deb
apt install ./mongocli_1.25.0_linux_arm64.deb
cd /app
go build monalize.go
chmod +x monalize
./monalize --db_uri ...

Other info, I'm on an M1 Mac hence the Arm64 MongoCLI and the command otherwise worked.

ku9nov commented 2 years ago

hey It's expected behavior because you don't have mongodb inside golang container. Why you can`t download binary? or copy binary from container to host...