Closed ventra007 closed 2 years ago
I'll check on this, but I'm fairly certain I've tested both ways. Do you know which T-RMM version this was on?
I'll check on this, but I'm fairly certain I've tested both ways. Do you know which T-RMM version this was on?
Hi, I'm using v0.13.4 currently.
Hello,
Any progress on the investigation?
Sorry, not yet. Got caught up with other projects, but I'll try to take a look tonight.
Confirmed. That's odd...
The problem seems to be that the "agent_id" field in checks_check is blank. The TacticalRMM GUI is able to show historical data so I'm not sure how it's linking that in. Still digging...
Appears the queries could be changed to leverage agent_id instead of just the id. Found another problem along the way though. The Grafana queries seem to assume that the hostname is unique across all of TacticalRMM. This isn't necessarily true if you're using it in a multi-tenant environment.
I can help with fixing if you need the help. Just let me know!
I certainly require the help please 😄
I think I've fixed the 3 graphs and also fixed the windows update status after the has_pending_updates field was removed from TRMM.
Pull request: https://github.com/dinger1986/TRMM-Grafana/pull/19
I didn't fix the unique agent hostname issue as that's a larger issue. I'll open a seperate issue for that one.
Hi Zebble, Thanks when can we expect this fix? I am having the same issue
We'll have to wait for @dinger1986 to accept the pull request, or you can grab the modified JSON directly from the pull request (linked above).
Legend!. Managed to get my reports working, Thanks Zebble
Thank you for looking into that. I know Dinger has been busy, and my house got hit by the 'rona, so I haven't been getting much done. I'll take a look at this later today.
Any help is appreciated.
I found an error Zebble. Surely the memory check shouldnt be CPULOAD as shown down here? SELECT x AS "time", y as "Memory Usage" FROM checks_checkhistory, checks_check, agents_agent WHERE checks_checkhistory.agent_id=agents_agent.agent_id AND checks_checkhistory.check_id=checks_check.id AND agents_agent.hostname = '$Agents_HostName' AND checks_check.check_type='cpuload' AND x BETWEEN $timeFrom() and $timeTo() ORDER BY x
Line 576 on pull request
Should be SELECT x AS "time", y as "Memory Usage" FROM checks_checkhistory, checks_check, agents_agent WHERE checks_checkhistory.agent_id=agents_agent.agent_id AND checks_checkhistory.check_id=checks_check.id AND agents_agent.hostname = '$Agents_HostName' AND checks_check.check_type='Memory' AND x BETWEEN $timeFrom() and $timeTo() ORDER BY x
These work for me as per the changes you made: CPU
SELECT x AS "time", y as "CPU Load" FROM checks_checkhistory, checks_check, agents_agent WHERE checks_checkhistory.agent_id=agents_agent.agent_id AND checks_checkhistory.check_id=checks_check.id AND agents_agent.hostname='$Agent' AND checks_check.check_type='cpuload' AND x BETWEEN $__timeFrom() and $__timeTo() ORDER BY x
Memory
SELECT x AS "time", y as "Memory Usage" FROM checks_checkhistory, checks_check, agents_agent WHERE checks_checkhistory.agent_id=agents_agent.agent_id AND checks_checkhistory.check_id=checks_check.id AND agents_agent.hostname='$Agent' AND checks_check.check_type='memory' AND x BETWEEN $__timeFrom() and $__timeTo() ORDER BY x
Thank you very much 😄
Whoops! I must have re-copied the wrong query. Let me change that in the pull request. Should be done in a few minutes…
I found an error Zebble. Surely the memory check shouldnt be CPULOAD as shown down here? SELECT x AS "time", y as "Memory Usage" FROM checks_checkhistory, checks_check, agents_agent WHERE checks_checkhistory.agent_id=agents_agent.agent_id AND checks_checkhistory.check_id=checks_check.id AND agents_agent.hostname = '$Agents_HostName' AND checks_check.check_type='cpuload' AND x BETWEEN $timeFrom() and $timeTo() ORDER BY x
Fixed the cpuload/memory issue. Thanks for catching that @WolfgangZA. Added a new commit in the same pull request.
Fixed the cpuload/memory issue. Thanks for catching that @WolfgangZA. Added a new commit in the same pull request.
No problem @Zebble
Thank you everyone. I'll close this and wait for the pull request to be approved. I'll just manually enter these values for now.
Hi,
17
I must mention that I ran into this issue as well. My problem though was that the CPU and Memory checks was configured through an automation policy that applied it, and these are not pulling through. Only when I add the check manually does it appear.