Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with Seeing latest data + No Logging #19

Closed
DanielMabbett opened this issue Apr 27, 2017 · 3 comments
Closed

Issues with Seeing latest data + No Logging #19

DanielMabbett opened this issue Apr 27, 2017 · 3 comments

Comments

@DanielMabbett
Copy link

Hi Guys,

I am using this but cant seem to see any of the latest data:
screen shot 2017-04-27 at 16 43 10

sh mikoomi-mongodb-plugin-32.sh -D -z MONGOSERVERNAME -u MONGOUSER -x MONGOPASSWORD -H ZABBIXIP -P ZABBIXPORT

There is actually no logging coming through to /tmp/ as shown in README

Also getenforce is set to 0 (Disabled)

Any help?

@nightw
Copy link
Owner

nightw commented May 3, 2017

@ExplodingTurkey Could you tell me more about the MongoDB version and the PHP version you're trying this with.

I think the script does not support PHP 7 as it can be seen in this issue: #16

@tahz7
Copy link

tahz7 commented Jun 27, 2017

Hey,

Seeing the same issue. We're using mongodb 3.4, PHP 5.4.16.

When running the script initially we were getting the following error;

Fatal error: Class 'MongoClient' not found in /home/tahzeem.taj/mongodb-stuff/mikoomi-mongodb-plugin-32.php on line 145

I changed this line and instead added;

$mongo_connection = new MongoDB\Driver\Manager("mongodb://$connect_string") ;

Which connected, but gave further errors like;


PHP Fatal error:  Call to undefined method MongoDB\Driver\Manager::selectDB() in /home/tahzeem.taj/mongodb-stuff/mikoomi-mongodb-plugin-32.php on line 161

Fatal error: Call to undefined method MongoDB\Driver\Manager::selectDB() in /home/tahzeem.taj/mongodb-stuff/mikoomi-mongodb-plugin-32.php on line 161

The script isn't compatible with mongo 3.4, is there any simple fix for this or would it require a complete rewrite?

@nightw
Copy link
Owner

nightw commented Jun 28, 2017

I think the problem is not with MongoDB 3.4, but the PHP module on your part. If you check the documentation here it says the if you use the PECL module for MongoDB version 0.9 or higher has the MongoClient class. I think that you're trying to use this built-in MongoDB driver, which is not what the code is written for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants