Kaseya Community

Run a monitor report that [ideally] graphs CPU and RAM usage over time

  • This might be asking for too much, beyond Kaseya's abilities, but what I'd like to do is be able to run 2 reports on selected computers -- one that shows their average/peak CPU usage over a desired amount of time, in a graph, and another that does the same for RAM usage.

    If graphing it isn't possible, I'd at least like to see CPU usage and RAM usage (or available amount of system memory) in a table/chart (just listed), over time.

    By "CPU usage," I mean the % utilization of the CPU's (all of them averaged, if HT/multi-core). And "RAM usage" could be measured by average amount of free RAM available (to help determine if a computer is low on memory).

    I tried making a Monitor Set that monitors the Processor object, % Processor Time counter, and default settings for Collection/Alarm Operator/Threshold. Then I ran a report that looked at the history of that Monitor Set. But this just ended up showing all 0's, so I don't think I did it right.

    The idea behind this is to look at any managed computer (or multiple ones), and look at how much the processor is being used and how much RAM is usually available. The averages might not be useful because if the computer is on but not being used, then the times the CPU is around 0% and free RAM is high might take the average down quite a bit. Maybe a graph that shows how often CPU usage goes over, say, 60%, and how often avail. RAM is under 50MB might be useful. (Also I made a Monitor Set that alarms when avail. RAM is under 50MB, and this alarm went off right away on 2 computers, but when I checked those computers manually right after their avail. RAM was ~400MB. So I probably didn't create that Monitor Set correctly, either).

    I am a Kaseya newbie, so a detailed, step-by-step procedure (if this is possible) would be greatly appreciated and very helpful!!!


    ~Tony

    Legacy Forum Name: Run a monitor report that [ideally] graphs CPU and RAM usage over time,
    Legacy Posted By Username: TonyJ
  • cpu.jpg
    You need to go thru the monitoring classes (and all of the other classes for that matter). It is unnecessary for the forum group to reproduce the work that your vendor has already put together for you (meaning the step-by-step necessary to setup such a monitor).

    The help files can walk you thru a lot of it to.

    Steps:
    - Goto the "Assign Monitoring" function under the Monitoring tab.
    - Assign "Base Server Performance" (should be included with the samples) to the machines that you want these graphs for.
    - After an appropriate period of time, goto the "Monitor Log" function and click on the machine that you assigned the "Base Server Performance" counters to
    - From here you can see what your monitor settings where as well as view graphs (like attached).

    Legacy Forum Name: How-To,
    Legacy Posted By Username: rwitt
  • mb.jpg
    Attachment refers to previous post.

    Legacy Forum Name: ,
    Legacy Posted By Username: rwitt
  • rwitt, I went through all the classes, including the Monitoring class, which is why I knew how to create a Monitor Set. However, like I wrote in the post, when I created the Monitor Sets and tried to run a report on it, the graph showed up blank, which is why I was looking for more detailed information on how to properly create the monitor set. (Counter = % Processor? % User? Instance = _Total? 1? 2?).

    The Monitoring class/video did not contain any specific information on how to monitor and report on CPU Usage and RAM Usage over time. That's why I came to the forum for more specific help.

    For anyone with the same problem I was having, for CPU Usage... I set the Monitor Set's Object to Processor,

    Counter = % Processor Time
    Instance = _Total
    Collection Operator = Over
    Collection Threshold = 10 (won't get anything under 10% usage)
    Sample Interval = 1 Minute
    Alarm Over 80, Duration 1 Minute, Ignore additional alarms for 3 hours.


    For the Available RAM Monitor Set...

    Object = Memory
    Counter = Available MBytes
    Collection Operator = Under
    Collection Threshold = 2000 Available MBytes
    Sample Interval = 20 Minutes
    Alarm = Under 50 MB for 25 seconds, ignore additional for 3 hours.

    (Obviously the Alarm and other settings can be tweaked to your liking, but I found that my sample interval was too large, and Collection Threshold too high).

    Legacy Forum Name: How-To,
    Legacy Posted By Username: TonyJ
  • The problem with setting the "threshold" limit is that if the condition is never satisfied, you will never collect any data, hence you will get a big nothing for graph. Try using "above 0" as the threshold, and see if you start getting values recorded. You can then fine-tune later.

    I've found the values for Available MBytes to be fairly useless to monitor, as it will remain nearly fixed at certain values depending on how much physical memory you have.

    Legacy Forum Name: How-To,
    Legacy Posted By Username: Lmhansen
  • There are some certain instances where permissions could effect things (depending on where your agent temp folder resides) and also I've noticed that Kaseya adds the monitors but does not always start them. I schedule this script to run on every machine every day at 6:15AM and do not skip if offline.


    Here's my startperflogs.bat:

    @for /f "tokens=1" %%A in ( 'logman query ^| find "Stopped"' ) do logman start %%A


    I know there's other tools, but I use the setacl.exe from this website:
    http://www.helge.mynetcologne.de/setacl/


    Here's my Fix Monitoring script:

    Script Name: Fix Monitoring
    Script Description: Sets appropriate permissions on Kaseya Agent temp folder so that the windows' Performance Monitoring and Alerts service can read the folder. Also querys the Performance Monitoring Alerts service and enables all performance counters. (Most if not all of the counters would have been added to the service by Kaseya)

    IF Test File
    Parameter 1 : c:\setacl.exe
    Exists :
    THEN
    Write File
    Parameter 1 : c:\setacl.exe
    Parameter 2 : VSASharedFiles\RichardVB\KaseyaTemp\x86\SetACL.exe
    OS Type : 0
    Get Variable
    Parameter 1 : 10
    Parameter 2 :
    Parameter 3 : agenttemp
    OS Type : 0
    Write File
    Parameter 1 : %temp%\startperflogs.bat
    Parameter 2 : VSASharedFiles\RichardVB\KaseyaTemp\startperflogs.bat
    OS Type : 0
    Execute File
    Parameter 1 : c:\setacl.exe
    Parameter 2 : -on "#agenttemp#" -ot file -actn setprot -op "daclStick out tongue_c;saclStick out tongue_c" -rec cont_obj -actn ace -ace "n:S-1-5-20;p:full;s:y" -ace "n:S-1-5-18;p:full;s:y" -actn rstchldrn -rst "dacl,sacl"
    Parameter 3 : 3
    OS Type : 0
    Execute File
    Parameter 1 : %temp%\startperflogs.bat
    Parameter 2 :
    Parameter 3 : 3
    OS Type : 0
    Delete File - (Continue on Fail)
    Parameter 1 : %temp\startperflogs.bat
    OS Type : 0
    ELSE
    Write File
    Parameter 1 : c:\setacl.exe
    Parameter 2 : VSASharedFiles\RichardVB\KaseyaTemp\x86\SetACL.exe
    OS Type : 0
    Get Variable
    Parameter 1 : 6
    Parameter 2 :
    Parameter 3 : machine
    OS Type : 0
    Schedule Script
    Parameter 1 : 73933083
    Parameter 2 : 1
    Parameter 3 : #machine#
    OS Type : 0


    Legacy Forum Name: How-To,
    Legacy Posted By Username: Richard Williams
  • Are you using the v2.0.3.0 (SetACL.exe)? Do you use the Command Line version from the Open Source Forum?

    Thanks!

    Legacy Forum Name: How-To,
    Legacy Posted By Username: billmccl
  • Downloaded from SourceForge, I believe.

    Legacy Forum Name: How-To,
    Legacy Posted By Username: Richard Williams
  • I'm not sure if Kaseya automatically does this for you when you import scripts... in the ELSE section of the script, make sure the last step is pointing to the correct script. (It should point to itself...)

    Legacy Forum Name: How-To,
    Legacy Posted By Username: Richard Williams