Adding your first host. This also shows creating graphs and a tree structure. Click below for video tutorial!
(more…)
Blog
-
Cacti Tutorial – Add a Host
-
Cacti Tutorial – Configure SNMP Windows Server
Configure SNMP on windows so we can poll with Cacti. Click below to see the video tutorial!
(more…) -
Mikrotik Newsletter 15
Big announcement, for me anyway, is a new router board, the 450G. I was a big fan of the 150, which is a 5 port 10/100 series mikrotik. I believe the proc was a 130Mhz. Then they came out with the 450, which is a 5 port 10/100 series with a 300Mhz proc. NOW they have the 450G which is a 5 10/100/1000 porter that has 256 megs of ram which can hold the full Internet route table(my routers are currently using about 160MB to hold the table with about 272K routes) and a 680Mhz proc! No numbers yet, speed testing or price, but the 150/450 could both be had with a case for ~$90, so perhaps we can hope for the same!
-
Cacti Tutorial – Set IP on my CactiEZ server
This is the first in my series of cacti tutorials. I’m starting at the start. Once you have CactiEZ loaded, the first thing you need to do is set a static IP on your server. I present you with two command line methods to do so. Click below to see the video tutorial!
-
What is Cacti?
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.
-
My Thumb Drive
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.
-
Mikrotik Hotspot – Disable/Enable Guest Daily
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)
Categories
- 3D Printing (3)
- Access Control (4)
- Ansible (59)
- Arduino (3)
- Ascender (4)
- Asterisk (6)
- Asterixk (2)
- Autoit (10)
- Cabling (2)
- Cacti (17)
- Cacti Tutorials (8)
- Cacti Video Tutorial (2)
- CallManager (21)
- Cambium (6)
- Chromecast (2)
- Cisco (86)
- Cisco ASA (7)
- Class Video (5)
- Cloud (2)
- Dude (2)
- Fiber (1)
- Fun (32)
- Greg Talks (1)
- Hardware (126)
- Hotspot (6)
- Linux (48)
- Mikrotik (314)
- Mikrotik Tutorials (17)
- Mikrotik Video Tutorial (9)
- Monitoring (4)
- My Thumb Drive (4)
- MySQL (6)
- Networking (231)
- PLC (1)
- Podcast (164)
- Pop Quiz (2)
- Programming/Scripting (10)
- SCADA (1)
- Script (8)
- Security (21)
- Server (93)
- Template (2)
- TheBrothersWISP (92)
- Thoughts (50)
- Training/Classes (6)
- Ubiquiti (42)
- Uncategorized (150)
- Vmware (14)
- VOIP (25)
- Windows (26)
- Wireless (24)
- WISPAPALOOZA (4)
- zabbix (1)
