• JAMF

    Use the Jamf Classic API to Extract Device Counts

    You can leverage the API built into the Casper Suite to do lots and lots of cool stuff, without interacting directly with the database. Here, I’ll use a simple curl command in a bash script that has myuser as the username for a server and mypassword as the password. The server is myserver.jamfcloud.com. Basically, we’re going to ask the computers and mobiledevices tables for all their datas. Once we have that, we’ll constrain the output to just the size attribute for each using sed: curl -s -u myuser:mypassword https://myserver.jamfcloud.com/JSSResource/computers | sed -n -e 's/.*<size>\(.*\)<\/size>.*/\1/p' curl -s -u myuser:mypassword https://myserver.jamfcloud.com/JSSResource/mobiledevices | sed -n -e 's/.*<size>\(.*\)<\/size>.*/\1/p' This same logic can then be applied…

  • Home Automation,  Mac OS X,  Minneapolis,  sites

    Control the Weather Using Curl

    Wait, did I say control, I meant query… Sorry to disappoint! I am a home automation nerd. Recently I’ve noticed that as it gets closer to warmer or cooler extremes that it takes longer for my hvac system to bring my house to the temperature I want. I’ve also noticed that NEST claims to automatically learn these factors. Not to be outdone by the Griswolds, I decided to look at building this into my system. I had been experimenting with using the weather.com site to pull this data but then someone pointed out that NOAA (the National Oceanic and Atmospheric Administration) actually publishes this information on their site. I was…

  • Mac OS X,  Mac OS X Server,  Network Infrastructure

    The Cumulus Command Line Interface

    Cumulus comes with a number of commands installed in /usr/local/Cumulus_Workgroup_Server. The assets can be in a shared directory location, such as an NFS mount mapped to /cumulus or /Volumes/Cumulus. But in the /usr/local/Cumulus_Workgroup_Server directory there are a number of commands that can be pretty useful. For example, the stop-admin, stop-cumulus, start-cumulus and start-admin commands can be used to restart the Cumulus using a simple ARD template: /usr/local/Cumulus_Workgroup_Server/stop-admin.sh /usr/local/Cumulus_Workgroup_Server/stop-cumulus.sh sleep 30 /usr/local/Cumulus_Workgroup_Server/start-cumulus.sh /usr/local/Cumulus_Workgroup_Server/start-admin.sh There are others, such as status.sh, which shows size of repository, PIDs, and the time running. The repair.sh can be used to repair the database and remove-admin.sh and remove-cumulus.sh can uninstall the admin console and cumulus servers respectively…

  • cloud,  FileMaker,  Mac OS X,  Mac OS X Server,  Mac Security,  Mass Deployment,  Network Infrastructure,  Time Machine,  Xsan

    Obtain Information From Watchman Monitoring Using a Script

    Watchman Monitoring is a tool used to monitor computers. I’ve noticed recently that there’s a lot of traffic on the Watchman Monitoring email list that shows people want a great little (and by little I mean inexpensive from a compute time standpoint) monitoring tool to become a RMM (Remote Management and Monitoring) tool. The difference here is in “Management.” Many of us actually don’t want a monitoring tool to become a management tool unless we are very deliberate about what we do with it. For example, that script that takes a machine name of ‘rm -Rf /’ that some ironic hipster of a user decided to name their hard drive…

  • cloud,  Mac OS X,  Mac OS X Server,  Mac Security,  Mass Deployment,  Ubuntu,  Unix

    Using the CrashPlan Pro REST API

    CrashPlan Pro Server is a pretty cool tool with a lot of great features that can be used to back up client computers. There are a lot of things that CrashPlan Pro is good at out of the box, but there are also a lot of other things that CrashPlan Pro wasn’t intended for that it could be good at, given a little additional flexibility. The REST API that CrashPlan Pro uses provides a little flexibility and as with most APIs I would expect it to provide even more as time goes on. I often hear people run away screaming when REST comes up, thinking they’re going to have to…