Here is another post in my What is series. I plan on introducing the products I will be writing about the most in this fashion. Build a little background, then start moving on to specifics.
Cacti is THE monitoring solution. Not just Open-source, but any source. I want to say it was around 4 years ago I was doing some research on netflow collection. I had been browsing source-forge, page after page. It was about midnight and I was quickly approaching being brain fried. I, randomly, clicked the link at the bottom of the page to jump to like page 110. There was Cacti. I read the description and it really had nothing to do with Netflow, but it sounded interesting. I continued to read about it. It does SNMP monitoring of any kind of device. It has built in templates for most devices, and you can build and download templates for anything not included. I installed it and had it running relatively easily. Within a couple of days our exchange server’s C drive filled and the mail store stopped and our manager was screaming for a way to monitor this…”Check out Cacti. We can monitor and alert for just this situation.” We began using it immediately and I haven’t stopped singing it’s praises since.
By default all it does is SNMP monitoring, and it does it extremely well. On top of that there are a ton of awesome plugins. While speaking of plugins I have to mention that a co-worker that helped me get that first Cacti box running, Jimmy, quickly began to love the system also. He is one of the finest PHP programmers I have ever met and since Cacti is written in PHP…well…he’s now one of the core developers…heh. He developed the plugin architecture and has written most of the plugins that really make Cacti a powerhouse.
Cacti instillation isn’t too bad. It can run on any OS that supports PHP, including Windows. The easiest way to install is using CactiEZ, which is a Centos based distro that auto loads Cacti will the plugin architecture and many plugins. You simply burn an ISO, insert it into your machine, and sit back. The CD formats the drive and loads the OS. Remove the CD when it is installed and reboot and you have a fully functioning instillation. Since it is developed by Jimmy, it has tons of plugins running. It will do your Netflow aggregation and displaying, weather-maps(a map with arrows between your devices displaying bandwidth utilization), mac address tracking in your network, syslog collecting and alerting(and with a new plugin SNMP trap collection and alerting), a host monitoring page with audio alert ( great for a NOC display).
How do I use Cacti?
- Syslog – every BGP, OSPF, Login, Spanning-tree event alerts us
- Weathermap shows us traffic flow on our network
- Graphing – I monitor and alert on hard drive utilization(anything above 80%), CPU utilization, temperature, genset fuel level, etc.
If you want, you can monitor the level of toner in your printers! It can do everything.
CactiEZ can be found at cactiusers.org.
Cacti.net is the official page for cacti and has exceptional forums.
I’m going to post my common and not so common tools I have on my thumb drive. Some I use infrequently, and some I use daily. I’m going to post a few at a time.
UltraVNC – My VNC of choice. It has good compression options as well as a quick toolbar at the top that allows you to lock input, blank screen, transfer files and chat.
Winscp – Securely copy files to and from your Linux machines. I doubt there is anyone who hasn’t/doesn’t use this.
usrmgr.exe – The NT4 domain user manager interface. This is pre MMC. You never know when this will come in handy. If you run a samba PDC, you can edit accounts using this.
Thunderbird portable– portable version of tbird email program. The link actually goes to portableapps.com. Portable apps has most of your favorite opensource apps in a format that doesn’t require you to install anything.
Tdimon/tcpview/tcpvcon– Many of you may remember sysinternals. They were bought by M$, but their free utilities can still be had. These allow you to monitor incoming and outgoing tcp connections. Good for trouble shooting some applications.
Regmon – Another sysinternals. This one monitors reads and writes to the registry. See where exactly your application checks the reg at startup.
We have hotspot gateways at different locations. Each uses radius authentication, for employees, on our Active Directory(AD) domain. To prevent abuse of the access by guests, we wanted them to have to login as well. Rather than creating a single or even a handful of guest accounts, I wanted to have a new one for each day. This should provide for better security by using 366 different combinations. Also, depending on the size of your password it would take a considerable amount of time to “guess” the correct password for that day. In addition, if I were to use an AD account, I would have to manually enable/disable the accounts daily, which is definitely something to avoid.
I have 366 hotspot user accounts created. Each is named guestX where X is the day of year. As in guest1 for the guest account for January 1st. Each account has a different password.
- The Disable script is scheduled to run at 23:58 everyday to disable the last 5 days guest accounts. I do 5 days just in case there were some sort of power failure and the script hasn’t run for some time.
- The Enable script runs at 00:01 everyday to enable that day’s guest account.
- The Autoit script creates a text file with all the guest accounts with random passwords ready to paste onto the command line. Autoit is a free scripting language for windows that will do most anything. The executable can be DL’d here [download#1]. Also for more info on Autoit, see my Autoit post.
- The last piece is up to you, which is how to distribute the usernames/passwords. We have a page on our sharepoint server that will give you that day’s username/password.
All scripts were written and run on ”’2.9.51”’ systems.
==Disable Script==
:local date
#get system date
:set date [/system clock get date]
:local day
:local dayc
:local month
:local year
:local leap
:local dayof
#sets the values
:set month [:pick $date 0 3]
:set day [:pick $date 4 6]
#this is just incase the day has a 0 before the number
:set dayc [:pick $date 5 6]
:set year [:pick $date 7 11]
:set leap [:pick $date 0 6]
:set dayof 0
#sets starting date for month
:if ($month = “feb”) do={ :set dayof 31 }
:if ($month = “mar”) do={ :set dayof 59 }
:if ($month = “apr”) do={ :set dayof 90 }
:if ($month = “may”) do={ :set dayof 120 }
:if ($month = “jun”) do={ :set dayof 151 }
:if ($month = “jul”) do={ :set dayof 181 }
:if ($month = “aug”) do={ :set dayof 212 }
:if ($month = “sep”) do={ :set dayof 243 }
:if ($month = “oct”) do={ :set dayof 273 }
:if ($month = “nov”) do={ :set dayof 304 }
:if ($month = “dec”) do={ :set dayof 334 }
#check for leap year
:if ($leap = “feb/29”) do={ :set dayof 366 }
#this removes any leading 0 s from the day
:if ([:pick $date 4 5] = 0) do={ :set day ($dayc)}
#determines day of year #
:if ($dayof < 366) do={ :set dayof ($dayof + $day) }
#disables last 5 days worth, just incase of power failure
:for e from ( $dayof – 5 ) to ( $dayof ) do={ /ip hotspot user disable (“guest” . $e) }
#this accounts for first of the year
:if ($dayof < 4) do={ :set dayof 366 }
:if ($dayof = 366) do={:for e from ( $dayof – 5 ) to ( $dayof ) do={ /ip hotspot user disable (“guest” . $e) }}==Enable Script==
:local date
:set date [/system clock get date]
:local day
:local dayc
:local month
:local year
:local leap
:local dayof
#sets variables
:set month [:pick $date 0 3]
#just incase there is a leading 0 in the day
:set dayc [:pick $date 5 6]
:set day [:pick $date 4 6]
:set year [:pick $date 7 11]
:set leap [:pick $date 0 6]
:set dayof 0
#sets start day of year
:if ($month = “feb”) do={ :set dayof 31 }
:if ($month = “mar”) do={ :set dayof 59 }
:if ($month = “apr”) do={ :set dayof 90 }
:if ($month = “may”) do={ :set dayof 120 }
:if ($month = “jun”) do={ :set dayof 151 }
:if ($month = “jul”) do={ :set dayof 181 }
:if ($month = “aug”) do={ :set dayof 212 }
:if ($month = “sep”) do={ :set dayof 243 }
:if ($month = “oct”) do={ :set dayof 273 }
:if ($month = “nov”) do={ :set dayof 304 }
:if ($month = “dec”) do={ :set dayof 334 }
#checks for leap year
:if ($leap = “feb/29”) do={ :set dayof 366 }
#this removes any leading 0 s from the day
:if ([:pick $date 4 5] = 0) do={ :set day ($dayc)}
#totals up the day of year
:if ($dayof < 366) do={ :set dayof ($day + $dayof) }
:log info ($dayof)
#enables proper day
/ip hotspot user enable (“guest” . $dayof)==Autoit Script==
;generate usernames and passwords for hotspot.
$file = FileOpen(@ScriptDir & “\users.txt”, 1)
; Check if file opened for writing OK
If $file = -1 Then
MsgBox(0, “Error”, “Unable to open file.”)
Exit
EndIf
for $x = 1 to 366
FileWriteLine($file, “add name=””guest” & $x & “”” password=””” & Random(111111, 999999, 1) & “”” profile=default disabled=yes” & @CRLF)
Next
FileClose($file)
You guys will continue to see me post about Mikrotik. Most of you will have never heard of it, which is a shame. Mikrotik is a rich man’s all in one router at a poor man’s price. It has a huge feature set including OSPF, BGP, MPLS, VPLS, VPN aggregation, 802.1q trunking, superb firewalling, layer 7 firewalling and policy matching, queueing and much more. All of this with a cli and an unmatched GUI. It is a Linux base, though you are locked out of the base OS, which makes it more an appliance than a server. You can load this on any x86 PC for the low price of $50 for a level 4 license.
They also sell ridiculously cheap embedded systems at routerboard.com.
You will hear me talk about their wired implementations most often, but they cut their teeth, and have the highest density of usage as wireless devices. Most of the WISPs in the area use them for their high features and low cost. I’ve seen wireless shots, including both sides of the link, getting 50Mb of throughput for a total cost of ~$500!
Needless to say, it is an exciting product…or I’m just very excitable.
PS: You can install on a machine and run unlicensed for 24 hours. Try throwing it on an old box or on a VM and see what you think. What do you have to loose?
Well, hello and welcome to my first blog and it’s first post. I plan to put many pointless things on here that perhaps you will find useful. That might be asking a lot…heh.
My name is Greg Sowell and I am currently Lead Network Engineer for FIBERTOWN datacenter in Bryan, Texas. I’m a CCNP who just recently passed my CCIE written.
I have many random ideas and projects which will follow soon.
If you are a regular listener or visitor to everything TBW, you already know about WISPAPALOOZA 2017. If not, go learn about it here.
I thought a good topic to throw out some tips and tricks for first-time visitors as well as regular attendees.
WISPAPALOOZA is held at the Rio in Las Vegas. Unlike many other cities, Las Vegas hotels do not have widespread shuttle service themselves. You can buy a ticket from a 3rd party shuttle service such as the ones listed here. You can also take a taxi, a private car, or UBER/LYFT.
Regardless of what method you take you want to make sure your driver knows you want to be dropped off at check-in desk entrance. Many drivers will drop folks off at the quickest entrance, and then you have to walk all the way through with your bags just to check in.
Bring a spare battery, if your phone supports such things. Having an external charger and extra phone cable is extremely helpful. Going back to your room to plug in your phone for “a few minutes” could be a half hour round trip. Get yourself a battery like this http://amzn.to/2x12Myp
Just two tips to get you going.
-Justin

