Friday, February 22, 2013

Stardates Updated

Stardate: 90749.1018235
I've been using this website for calculating the current stardate whenever I make a blog post. I like the stardates, I want to keep them, and to generally Trekify the rest of this blog. But entering in a the current date into HTML forms every time sucks. So I've reverse engineered their algorithm and written a bit of python to do the calculations for me. The python (and an attempt at preserving my math) is available here. In the future I want the blog to know what time it is I published and calculate and display the stardate based on that.

Monday, February 11, 2013

Nagios, maintenance windows and puppet

Stardate: 90721.31
Nagios is an excellent network monitoring service. It is used in production where I work. We wanted to be able to create maintenance windows using the web gui. (Actually we wanted a command line utility, but thats a separate post.) Turning off the default 'readonly' mode turned out to be a real pain and poorly documented. I ended up following the recommendations of this blog as well as some of the comments by readers. I also took the time to create a snipped of puppet code you can put in your manifests to make it easy to turn the command mode on. Note that the puppet code uses the default 'nagiosadmin' user and that it uses file_line from the puppet labs stdlib module. The code is available with syntax highlighting here.
  # the following is for enabling write access to the web gui
  if $readonly_web == false {

    file_line {.
      '/etc/nagios3/nagios.cfg-external-commands-yes':
        line    => "check_external_commands=1",
        path    => '/etc/nagios3/nagios.cfg',
        notify  => Service['nagios3'],
        require => Package['nagios3'];
      '/etc/nagios3/cgi.cfg-all_service_commands':
        line    => "authorized_for_all_host_commands=nagiosadmin",
        path    => '/etc/nagios3/cgi.cfg',
        notify  => Service['nagios3'],
        require => Package['nagios3'];
      '/etc/nagios3/cgi.cfg-all_host_commands':
        line    => "authorized_for_all_service_commands=nagiosadmin",
        path    => '/etc/nagios3/cgi.cfg',
        notify  => Service['nagios3'],
        require => Package['nagios3'];
    }   

    user { 'nagios':
      groups      => ['nagios', 'www-data'],
      membership  => minimum,
      require     => Package['nagios3'];
    }   

    file { '/var/lib/nagios3/rw':
      owner   => 'nagios',
      group   => 'www-data',
      mode    => '2710',
      ensure  => directory,
      require => Package['nagios3'];
    }   

    file { '/var/lib/nagios3':
      owner   => 'nagios',
      group   => 'nagios',
      mode    => '0751',
      ensure  => directory,
      require => Package['nagios3'];
    }   

  }

Nanog 4

Stardate: 90718.8
Nanog ended Wednesday. :( After much traveling I am home. It was an incredible experience and I learned a lot. My notes on the third day are here: notes. I want to join the NANOG organizers and thank the sponsors of the conference for making it possible: Cyrus One, NTT, Google, Verisign, and Netflix. I met a lot of people and learned a lot(especially in the configuration and purpose of Internet exchanges).
For any other students out there, NANOG is going to do something to improve their system for students. They already give you a significantly discounted ticket price if you are a student, but the process for coming to NANOG is still hard to navigate. My advice to you now is to sign up for a ticket and check the 'student' box. You will immediately be given access to the student price. You will eventually have to verify your student status with the administrators of the conference, but you can do that later by email. For the next NANOG, they are going to redo the website and streamline the student ticketing/verification process. They are also preparing to launch a scholarship program. If you want to go to NANOG 58 in New Orleans and this stuff has not happened on the NANOG website. You can email the administrators, they are very approachable. You could even email me and I would love to help you.
Happy Hacking.

Wednesday, February 6, 2013

Nanog 3

Yesterday was day 2 of NANOG57. Like the previous day, I had a blast.
I was pretty tired but took notes on some of the presentations I attended here.
This second day was a lot more social for me. I met individuals from companies all over the networking spectrum. Big shoutout to Joe from google, Jeremy from box.com, Charles from wins.net, David from Windstream, and Paul from Jive(Go Portland!). Which is somewhat ironic since while I think of Jive as being a Portland company, something like half of their workers(including Paul) don't work in Portland. These guys are all network admins for their companies/isps and I learned a lot from just talking to them.
I also want to make a big shoutout to Imtech, a UK company that sent Dave and another to NANOG. Dave and his friend are really cool people and welcomed me in right from the start.
I also want to thank the guys whose names I did not get from Comcast, Level 3, and Microsoft who welcomed me with open arms at the Beer 'n Gear. That was a lot of fun and I learned a lot.
Time for breakfast, will report in with more later.

Monday, February 4, 2013

Nanog 2

Wow! What a day. Day 1 of NANOG 57 was a rush and a blast. A brief summary before I collapse from exhaustion.
My brief and unedited notes are here. Another adventurous user has been keeping notes here. These notes only go slightly beyond what is presented in the abstracts for the presentations. A big shoutout and thank you to everyone who presented today. It was awesome.
I met a *ton* of cool people today. Among them were two network designers from the U.K., three professional network admins for three different internet exchanges in Germany(including DE-CIX, the largest IX in the world.) I met several engineers from other companies at the "Newcomers Lunch," and met several people from a major backbone provider after that.
I learned a lot and am looking forward to going back again tomorrow.

Nanog 1

I have an updated wpa_supplicant.conf for nanog. The initial configuration didn't work in practice:
network={
     ssid="NANOG-secure"
     scan_ssid=1
     key_mgmt=WPA-EAP
     pairwise=CCMP TKIP
     group=CCMP TKIP
     eap=TTLS PEAP TLS
     identity="nanog"
     password="nanog"
     phase1="peaplabel=0"
}

Sunday, February 3, 2013

Graphite: Vim vs Emacs

Stardate: 90697.76
Graph all the things! Graphite is a real time graphing tool. It allows sysadmins like myself to visualize statistics about our environment and change over time. We can also, using the graphite dashboard, easily map different data sources onto each other to try to find correlations or just to look at differences in use.
Nightfly, a co-worker of mine, has developed a script to run against our college's general login boxes. These boxes are used by the CS, ECE, and other departments. It provides a good picture of what people are using against time and against each other. Obviously the first order of business is to prove which editor is more popular:
The program to collect and submit this data is on github. The botnet element of this is hacked together with cron and ssh.
Big thanks to Nightfly for making the tech behind this post.

Nanog 0

Stardate: 90697.69
NANOG (North American Network Operators Group) is meeting in Orlando for NANOG 57. I am in Orlando and will attend.

You can see the agenda here. From the first day, I'm looking forward to the 'Newcomers Lunch,' BCOP(Best current operational practices), and the panel on the impacts of Super Storm Sandy.
I'm very excited about the wireless. From Nanog's page on the subject:
For the duration of the meeting conference, NANOG provides a dual-stack IPv4/v6 meeting network. IP address allocation is available by DHCP for IPv4 and neighbor discovery for IPv6. No NAT or translation protocols are utilized, in addition local NANOG DNS servers offer DNSSEC capability.
Woot!
I believe the following wpa_supplicant.conf configuration will work for me:
network={
        ssid="NANOG-a-secure"
        scan_ssid=1
        key_mgmt=WPA-EAP
        pairwise=CCMP TKIP
        group=CCMP TKIP
        eap=TLS
        identity="nanog"
        identity="nanog"
}
I will report on the wireless at NANOG tomorrow. I'll also see if I can find the certificate used by the access points.