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

API: System endpoint, more health graphs #8730

Merged
merged 4 commits into from May 19, 2018

Conversation

Projects
None yet
3 participants
@pheinrichs
Contributor

pheinrichs commented May 16, 2018

This PR adds memory, processor, disk usage to the /health endpoint.

At this time, no id specific info will be displayed about those graphs, only stacked graphs can be displayed for these.

DO NOT DELETE THIS TEXT

Please note

Please read this information carefully. You can run ./scripts/pre-commit.php to check your code before submitting.

Testers

If you would like to test this pull request then please run: ./scripts/github-apply <pr_id>, i.e ./scripts/github-apply 5926

@@ -825,6 +825,30 @@ function list_available_health_graphs()
'name' => 'device_'.$graph['sensor_class'],
);
}
$processor = dbFetchRows('SELECT * FROM `processors` WHERE device_id = ?', array($device_id));

This comment has been minimized.

@murrant

murrant May 17, 2018

Member

Shouldn't these be count queries since you don't need any data? SELECT COUNT(*) ...

This comment has been minimized.

@pheinrichs

pheinrichs May 17, 2018

Contributor

Yep, you're right. Actually is eloquent usage appropriate?

This comment has been minimized.

@murrant

murrant May 17, 2018

Member

That would be fine by me, all this needs to be converted to Eloquent eventually. Eloquent is safe to use in API and Web UI. It is disabled in poller/discovery for now until we can send a notification for uses to increase their mysql max connections.

pheinrichs added some commits May 17, 2018

@murrant murrant merged commit 2d7423c into librenms:master May 19, 2018

3 checks passed

WIP ready for review
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details

@laf laf added the API label May 30, 2018

mattie47 added a commit to mattie47/librenms that referenced this pull request Jul 2, 2018

API: System endpoint, more health graphs (librenms#8730)
* API: System endpoint, more health graphs

* Add new line api_functions

* Get count of relationships

Using eloquent

* Add new lines in Models

@lock lock bot locked as resolved and limited conversation to collaborators Jul 29, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.