Observium has been recording artificially high CPU for RE0 on my MX-104, and I finally spent the time to understand what was going on and look for a solution. Here’s what I found in case it helps someone else.

I say artificially because monitoring the system from the CLI reported 30-40% CPU usage with significant spikes during SNMP polling, but Observium constantly recorded 100% CPU usage.

First up, I got the juniper to stop reporting on it’s internal interfaces and a bunch of others that show up by default. This removed a bunch of interfaces that existed but never had data and observing was polling. This cut the poll time down a fair bit, so I mention it if you haven’t used it on a juniper before. If you want this, it’s:
snmp {
    filter-interfaces {
        all-internal-interfaces;
        interfaces {
            <other interface you don’t want stats for here>;
        }
    }
}

I also went through and turned off all the modules it wasn’t using or weren’t producing any data in polling or discovery. Helped a little more, but exposed something odd. When I would run polling on just the processors module, it would report CPU usage that matched what I saw in the CLI. When it ran as part of the whole host polling, it reported 100%. Figured out it was polling the processors after it had polled sensors and the 550 interfaces on this router, and that has run up the CPU utilization while it was polling, so the RE was reporting that instant CPU usage while it was still high.

Not sure it was the best way, but moved the processor module to the head of the polling queue, and now I’m getting a CPU status that is more representative of the general load on the RE, and not the 100% usage the SNMP polling was causing. This router has always had this many interfaces, so as far as I can tell, a change in polling order caused this behavior and not a growth in interfaces.

Here’s my patch to includes/polling/functions.inc.php if it’s helpful to anyone:
Index: functions.inc.php
===================================================================
--- functions.inc.php (revision 8345)
+++ functions.inc.php (working copy)
@@ -639,6 +639,11 @@
             //print_warning("Module [ $module ] excluded for device.");
             continue;
           }
+          if ($module == 'processors')
+          {
+            array_unshift($poll_modules, $module);          // Add 'processors' before all
+            continue;
+          }
           if ($module == 'unix-agent')
           {
             array_unshift($poll_modules, $module);          // Add 'unix-agent' before all