How to fix munin’s netstat passive connections increasing constantly

Another thing I googled until I was all googled out and couldn’t find an answer, so for future explorers who pass by here, here’s the fix…

If you’re running munin and you suddenly notice the number of netstat passive connections is constantly increasing in a linear fashion, rest assured it’s not your server that’s busy beating itself into oblivion. It’s a munin bug that’s easily fixed.

If you run netstat and get something like this:

netstat -s|grep passive
3339672 passive connection openings
7574 passive connections rejected because of time stamp

…then it’s the passive connections rejected that’s confusing munin.

To fix this edit:

/usr/share/munin/plugins/netstat

and change the line

netstat -s | awk ‘/active connections/ { print “active.value ” $1 } /passive connection/ { print “passive.value ” $1 } /failed connection/ { print “failed.value ” $1 } /connection resets/ { print “resets.value ” $1 } /connections established/ { print “established.value ” $1 }’

to

netstat -s | awk ‘/active connections/ { print “active.value ” $1 } /passive connection openings/ { print “passive.value ” $1 } /failed connection/ { print “failed.value ” $1 } /connection resets/ { print “resets.value ” $1 } /connections established/ { print “established.value ” $1 }’

3 thoughts on “How to fix munin’s netstat passive connections increasing constantly

  1. hey, thanks for this… im getting “active” connections increasing in this manner…

    can i apply this fix accordingly or do i have a more serious “real” problem?

    cheers

    c.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Notify me of followup comments via e-mail. You can also subscribe without commenting.