Opened 11 years ago

Last modified 10 years ago

#43232 new enhancement

cacti port improvements

Reported by: jul_bsd@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch Cc:
Port: cacti

Description

  • include some mainstream patch vs known bugs
  • set default path/settings to macports
  • add user/group cactiuser
  • add plist file instead of cron (#16969 )
  • conf as examples and post-activate
  • example web config for nginx
  • review notes w indication to setup snmpd
  • variants but need review for plugin: superlinks (easy test), weathermap, advancedping

ideally, I would want a full mac template include by default for localhost.

Attachments (7)

patch-cacti-r7331.diff (4.5 KB) - added by jul_bsd@… 11 years ago.
patch-cacti-r7304.diff (587 bytes) - added by jul_bsd@… 11 years ago.
Portfile (8.3 KB) - added by jul_bsd@… 11 years ago.
bug "Portfile: extra characters after close-brace"
nginx-cacti.conf (301 bytes) - added by jul_bsd@… 11 years ago.
org.macports.cacti.plist (1017 bytes) - added by jul_bsd@… 11 years ago.
mp-cacti.conf (271 bytes) - added by jul_bsd@… 10 years ago.
patch-cacti-Portfile.diff (13.3 KB) - added by jul_bsd@… 10 years ago.

Download all attachments as: .zip

Change History (17)

Changed 11 years ago by jul_bsd@…

Attachment: patch-cacti-r7331.diff added

Changed 11 years ago by jul_bsd@…

Attachment: patch-cacti-r7304.diff added

comment:1 Changed 11 years ago by mf2k (Frank Schima)

Cc: markd@… removed
Owner: changed from macports-tickets@… to markd@…

comment:2 Changed 11 years ago by jul_bsd@…

  • review
  • use OtherJobEnabled in plist for dependency to mysql and net-snmp (the latter only if monitoring includes localhost but I suppose that's the normal case)
  • port lint
  • include a newsyslog template file for rotating log
  • remove some implicit PREFIX

Changed 11 years ago by jul_bsd@…

Attachment: Portfile added

bug "Portfile: extra characters after close-brace"

Changed 11 years ago by jul_bsd@…

Attachment: nginx-cacti.conf added

Changed 11 years ago by jul_bsd@…

Attachment: org.macports.cacti.plist added

comment:3 Changed 11 years ago by jul_bsd@…

  • as discussed on #43418, I added mysql variants. it's not enforced at all as cacti is only a web interface and will rely on which socket is declared in php.ini or server address.
  • also enable superlinks variant but need review to do it in the best manner. once it's working, can review more complicated plugins & template
  • the OtherJobEnabled in my plist is not working on my setup, I had to disable it. Can someone else give it a try?

comment:4 Changed 11 years ago by jul_bsd@…

I currently have a strange behavior with the poller task. It is supposed to execute as cacti user (515)

<dict>
    <key>Label</key>
    <string>com.macports.cacti</string>
    <key>Username</key>
    <string>cactiuser</string>
    <key>ProgramArguments</key>
    <array>
        <string>/opt/local/bin/php55</string>
        <string>-q</string>
        <string>/opt/local/share/cacti/poller.php</string>

but in my system.log, I got Permission denied error. files are owned by cactiuser which is normal

Apr 24 10:31:19 HOST com.apple.launchd.peruser.502[192] (com.macports.cacti[7162]): open("/opt/local/var/log/cacti/poller.log", ...): 13: Permission denied
Apr 24 10:31:19 HOST com.apple.launchd.peruser.502[192] (com.macports.cacti[7162]): open("/opt/local/var/log/cacti/poller_err.log", ...): 13: Permission denied

so why it is trying to execute as user 502 (gui user) ? there is only the sudo call to launchctl which could come from but even if I unload/load as root, it changes nothing I tried moving from LaunchAgents (which was working before) to LaunchDaemons dir but same too

comment:5 Changed 11 years ago by jul_bsd@…

comment:6 Changed 10 years ago by jul_bsd@…

  • I think the permission problem is solved and a consequence of newsyslog rotating and creating new files as root
  • mode line
  • sha256

Changed 10 years ago by jul_bsd@…

Attachment: mp-cacti.conf added

comment:7 Changed 10 years ago by mf2k (Frank Schima)

Owner: changed from markd@… to macports-tickets@…

markd has retired. See #44782.

comment:7 Changed 10 years ago by mf2k (Frank Schima)

Owner: changed from markd@… to macports-tickets@…

markd has retired. See #44782.

comment:8 Changed 10 years ago by jul_bsd@…

comments/test/commit ?

comment:9 Changed 10 years ago by jul_bsd@…

update to 0.8.8c

Changed 10 years ago by jul_bsd@…

Attachment: patch-cacti-Portfile.diff added
Note: See TracTickets for help on using tickets.