Mac OSX launchctl plist for poller - worked ..

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
jskogsta
Posts: 1
Joined: Sat Oct 17, 2020 4:12 pm

Mac OSX launchctl plist for poller - worked ..

Post by jskogsta »

Not sure if anyone else have had some issues with getting cacti going on Mac OSX. I recently installed in a mac mini with mariadb, but had problems getting the 'unix ping' to work on configured devices. Cron was tempramental and technically Apple's deprecating cron for launchctl. Hacked together this launchctl and then it worked.. #yay. Just posting in case anyone runs into similar issues:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>

        <key>Label</key>
        <string>local.cacti.plist</string>

        <key>ProgramArguments</key>
        <array>
        <string>/usr/local/bin/php</string>
        <string>/Users/<username>/local/webroot/cacti/poller.php</string>
        </array>

        <key>EnvironmentVariables</key>
        <dict>
        <key>PATH</key>
        <string>/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/local/opt/gnu-getopt/bin:/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/usr/local/bin:/usr/sbin/share:/Users/<username>/bin</string>
        </dict>

        <key>WorkingDirectory</key>
        <string>/Users/<username>/local/webroot/cacti</string>

        <key>StartInterval</key>
        <integer>300</integer>

        <key>UserName</key>
        <string>root</string>
        <key>GroupName</key>
        <string>wheel</string>
        <key>InitGroups</key>
        <true/>

        <key>Umask</key>
        <integer>20</integer>

</dict>
</plist>
Most of my stuff is installed with Homebrew if it exists there.. Anyhow.. hopefully this can help someone in the same boat..
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests