Dragging IRIX Into Modern Metrics

2023-04-19

I did a fun thing at work.

A group of us had run through Prometheus training, and the group coordinator had asked if people could present about new things they had discovered.

So, how I learn the absolute best is to tinker. Its not to read, because I’m at a 5th grade reading level, nor is it to listen and watch adult story time because I have a short attention span.

No, I learn by setting things up, playing with them, bashing my head against them, and THEN reviewing the training material.

My first thought was to set up these tools for my home network, and then my immediate afterthought was to see how much I could probe on my home network. Not the easy stuff like base OS metrics or ZFS stats, but ..

Yeah that’s right, I wanted to see how much useful metric data I could pull off of this little guy.

What exactly are we dealing with? How many cores and threads are we talking? How many gigs of memory do I have to run a dedicated process? How much disk space can I use to buffer metrics?

The answer is “none” lol

I have raspberry pi’s with more compute power than a 1993 $20k high end workstation. That’s 1 processor at 250 MEGAHURTZ, 320 MEGABYTES of SINGLE INLINE MEMORY. Not a ton of disk space, I think 4GB in total.

Let’s also take a look at what fancy interpreters we can use. I’m a big fan of Golang, but I’ve been know to dabble in Ruby and Python

So, not looking good! We have Perl 5.00 and cc

There is no way that I’m going to get a native prometheus exporter on this host, so its time for plan b.

SNMP!

I nearly had to use the wayback machine.

I had to search through newsgroups to find a version that ran on IRIX 6.5.22 and was still available

This license banner pops up with every call of c/cc/c++.

There is no way to get a license in 2023. This is why I hate licensed software locked behind closed corporate doors that will never see the light of day. Gcc is technically available, but this was still functional and I can’t help but want to use the OG mipspro compiler on my Indigo

in my day we configured and compiled by hand, and we liked it that way!

no joke, this is the full process list of an IRIX host after disabling the marketing garbage

UNIX TM workstations used to be pretty light weight, compared to now. A default IRIX install has way to many enabled by default services, purely for marketing and not security. What a pain this was to disable (before we had tools like Puppet/Salt/Ansible/Cfengine…), but even then it could operate in few megabytes of memory.

Let’s generate some noise! The most intense thing I can think of for this poor thing, besides trying to render something in Blender oh wait, I can’t even run that now.

Is finding prime numbers. Lets whip up some C:

thanks chatgpt

enough work to generate a consistent load over time

top

But lets take a step back. I have snmp compiled and running on my IRIX box, but what about a collector?

mcarlson@server ~ » pkg info snmp_exporter                                                                                                                                                                                                     1 ↵
snmp_exporter-0.20.0_6
Name           : snmp_exporter
Version        : 0.20.0_6
Installed on   : Sun Oct 23 18:15:20 2022 PDT
Origin         : sysutils/snmp_exporter
Architecture   : FreeBSD:13:amd64
Prefix         : /usr/local
tags     : sysutils
Licenses       : APACHE20
Maintainer     : fabian.freyer@physik.tu-berlin.de
WWW            : https://github.com/prometheus/snmp_exporter
Comment        : SNMP Exporter for Prometheus
Shared Libs required:
        libnetsnmp.so.40
Annotations    :
        FreeBSD_version: 1301000
        repo_type      : binary
        repository     : FreeBSD
Flat size      : 14.9MiB
Description    :
snmp_exporter is a prometheus exporter for information
gathered from SNMP for use by the Prometheus monitoring
system.

WWW: https://github.com/prometheus/snmp_exporter

My server, which is also my prometheus collector, has a snmp_exporter installed. The prometheus.yml is this:

I recommend snagging a snmp_exporter.yml from someone. You can generate it, and you’ll need it if you want to target things like ubiquiti devices or synology nas’s

Now, time for some classic Xbill