Feed on
Posts
Comments

I was excited to see that rrdtool 1.4 was finally released (in October), and with it rrdcached support finally in a main release.  After updating rrdtool packages on a couple of my systems I sat out to make things start using the new caching daemon. Cacti was my first to play around with since it uses a fair amount of RRD files.  Cacti has been coasting a while on Boost (which I have yet to try and is recommended to me by friends), so nobody is going out of their way to add rrdcached support yet.

A quick and dirty patch to Cacti enabled it:

--- lib/rrd.php.orig        2010-01-08 22:36:56.000000000 -0600
+++ lib/rrd.php     2010-01-08 23:25:30.000000000 -0600
@@ -68,6 +68,9 @@
function rrdtool_execute($command_line, $log_to_stdout, $output_flag, $rrd_struc = array(), $logopt = "WEBLOG") {
global $config;

+        $daemon_path = "unix:/var/run/rrdcached/rrdcached.sock";
+        $command_line = $command_line . " --daemon $daemon_path ";
+
if (!is_numeric($output_flag)) {
$output_flag = RRDTOOL_OUTPUT_STDOUT;
}

A strace of the rrdcached process showed it was being called when I was viewing graphs, but the poller wasn’t working. Turns out Cacti uses rrdtool update --template everywhere, which is incompatible with rrdcached:

01/08/2010 11:29:14 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/cacti/rra/tifa_abc_wann_net_load_5min_59.rrd --template load_5min 1263014937:0.05 --daemon unix:/var/run/rrdcached/rrdcached.sock
ERROR: The caching daemon cannot be used together with templates yet.

I don’t know offhand what the conflict with templates and rrdcached is. I can only guess that the cache internals doesn’t know how to deal with the extra DS information. Looks like we’ll be stuck with Boost a while longer.

rrdgraph vs rtgplot: ugly

libdbi support in RRDtool, RTG/JRTG

The other thing I’m interested in visiting again is the rrdgraph libdbi support.  I heavily use the JRTG SNMP poller along with the old rtgplot from RTG to draw graphs from the data it stores in a MySQL table. I hate rtgplot. The output isn’t nowhere as polished as what rrdgraph can do.

More importantly, rtgplot has no concept of unknown time samples. If there’s no data for an interface (poller broke, router down) for several sample periods, it plots the in/out lines from last known values to the next known values, hiding the gap. (Zero delta-insert otherwise gets around this — if the router was actually polled and the counter was zero)

Enter DBI support in RRDtool. Using rrdgraph to plot my JRTG counter data in MySQL. It holds great promise, providing pretty graphs, the option to average, and finally being able to get rid of the last original bit of RTG. Unfortunately, the last time I tried DBI support in 1.3.999something I was sorely disappointed. It worked, but it was *slow*, especially on yearly plots. What took 2-3 seconds to render with rtgplot took *minutes* to do with rtgraph_libdbi.

I know for a fact my database server can return a year’s worth of counter data (105,120 rows) in 1-2 seconds, even with an empty query cache. (protip: UNIQUE KEY 'id' (id,dtime)) It’s so silly, that I even wrote a rtg2rrd.pl script to dump a year’s worth of data, build a brand new RRD file on ramdisk with one massive RRDs::update, and generated a graph from that: 5 seconds.

So hopefully rrdgraph_libdbi has improved since then. We’ll see!

Hello web robots

Looking at webserver logs, web crawlers are my most popular visitors today:

  • Feedfetcher (Google): 32
  • Baiduspider (Baidu): 15
  • Googlebot (Google): 12
  • Yahoo! Slurp US: 12
  • Yahoo! Slurp China: 2
  • BlogSearch (IceRocket): 4

I guess if I have anything to say, it’ll be indexed somewhere!

A peep pointed me to a very interesting presentation by Robert Lustig, M.D., a Professor of Pediatrics at UCSF, called Sugar: The Bitter Truth. It’s fairly technical and goes into the biochemistry of glucose (table sugar), fructose, and ethanol to explain how the body (specifically the liver) metabolize all three. He describes the change in fructose intake over the past 30 years and what it’s done to world heath, eventually using the comparison of fructose and ethanol to prove fructose is a chronic poison like ethanol. Then he goes on to explain how this is winding up being fed to our infants, jumpstarting obesity and other health problems.

I’ve been anti-sugar, anti-sweetner for a few years now, unfortunately still taking in a good amount of HFCS in my diet. I found presentation very interesting because it shows exactly what happens inside the body, and fills in the “why” gaps of what’s good/bad about sugars.

First post of the decade!  And to think 10 years ago I was waiting for the digital world to end when 2000 rolled around.  Long live 2038!

Catching up

When you want  to encourage search engines to index your site, don’t forget the robots.txt you wrote in 2002 that says Disallow: /.  It kinda doesn’t help.  Both Google and Bing have some interesting tools to help manage your search listings. Both will tell you the last time you were crawled, errors found, and other useful stats.

Also, dear lazywebs: I’m looking for a VPS in Asia/Asia Pacific with native IPv6 to add to my borgcube.  NTT Singapore claims to have such a service, but they seem very expensive.  hosting.ipv6.com claims to have them as well, but nobody has ever replied to my inquiries.  I’d almost settle for a server on paintcans at this point.

I hate selinux

It turns out my problems with IPv6-only Net-SNMP wasn’t a problem with snmpd, it was a problem with selinux. After starting with -Dread_config -c /etc/snmp/snmpd.conf it became apparent:

snmpd[9026]: registered debug token read_config, 1
snmpd[9028]: /etc/snmp/snmpd.conf: Permission denied
snmpd[9028]: /etc/snmp/snmpd.conf: Permission denied
snmpd[9028]: Warning: no access control information configured.   It's unlikely this
agent can serve any useful purpose in this state.   Run "snmpconf -g basic_setup" to
help you configure the snmpd.conf file for this agent.
snmpd[9028]: NET-SNMP version 5.3.2.2

Sure enough, selinux was on without me realizing it:

[root@nicky root]# /usr/sbin/getenforce
Enforcing

Copying over my own snmpd.conf had fouled up the security context:

[root@nicky snmp]# ls -lZ
-rw-r--r--  root root user_u:object_r:user_home_t      snmpd.conf
-rw-r--r--  root root system_u:object_r:etc_t          snmpd.conf.orig
[root@nicky snmp]# chcon -u system_u -t etc_t snmpd.conf
[root@nicky snmp]# ls -lZ
-rw-r--r--  root root system_u:object_r:etc_t          snmpd.conf
-rw-r--r--  root root system_u:object_r:etc_t          snmpd.conf.orig
[root@nicky snmp]#

Now everything is all happy:

[bwann@raptor ~]$ snmpget -v 2c -c community udp6:nicky sysName.0
SNMPv2-MIB::sysName.0 = STRING: nicky.wann.net

Protip: you can also make Cacti use IPv6/UDP requests. Preface your system hostname with udp6: in the device configuration section.

Alternator replacement

alternatorAfter 170,000 miles the alternator in the truck finally decided to go south. At low (300-400) RPM after coming to a stop, the ammeter would start to droop and the engine would die. I’d have to keep my foot on the gas to keep RPM up. Otherwise while driving and idling it was fine. Fortunately I replaced it before it stranded me somewhere.

I suspect it’s been dying for a while. Last summer I noticed I’d have a weak idle with similar symptoms whenever sitting at a light and the A/C compressor would kick on.

I went by A-Line and bought a remanufactured AC Delco unit. Swapping it was quick and easy, took less than an hour to do. Which was good, because it was 36 F outside.

Web 1.4

wharrgarblI finally got around to joining 2002 by using a CMS. For the past eight years I’ve been using a text editor to maintain this site. The goal is to make the content more accessible and see what happens to search engine rankings.

A website with in-line images, comments, RSS feeds!  It’s gonna be big!  This is the future of interwebs!

Dusting off old hardware frozen in time:

Mar 5 07:23:33 aeris shutdown[26974]: shutting down for system halt

I just discovered a horribly annoying problem with the IPv6 firewall in the Airport Extreme. It doesn’t operate as “let these addresses have access to devices on the home network” (the source). It operates as “let the world access X service on this IPv6 address on my home network” (the destination). After beating my head on why I couldn’t ssh to my closetserver, I carefully re-read the Extreme’s setup dialog to realize this gem. The other half to this, if my external IPv4 address ever changes, I have to go re-edit my IPv6 firewall rules to account for the new 6to4 address.

I also discovered the holy grail, a Rolling Stone shoot that has Blake Lively and Leighton Meester together. This soothes the Airport anger for now.

[root@nicky bin]# /sbin/ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:16:3E:69:8E:99
          inet6 addr: fe80::216:3eff:fe69:8e99/64 Scope:Link
          inet6 addr: 2a01:348:0:6:5d59:506a:0:1/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

I turned off IPv4 completely on nicky and suddenly realized a few things:

  • NTP: There’s no v6 NTP servers in the rhel.pool.ntp.org pools. Wound up using Sixxs.net’s pool.
  • CentOS repositories: There’s not many v6 mirrors out there, but enough to successfully run a yum update.
  • RPMforge/dag repo: There’s no v6 rpmforge/dag mirrors that I fould find at all.
  • snmpd: snmpd hates me. I added the com2sec6 bits to my VACM configuration, and udp6:161 to my snmpd.options file. I know the request is making it because I see a “connection received from” entry in my log file for v6 addresses. Interestingly, the exact same snmpd.conf works on tifa with v6 requests, which still has v4 enabled.

« Newer Posts - Older Posts »