On Fri, Mar 4, 2011 at 4:22 AM, Jonathan Clarke <jonat...@phillipoux.net> wrote:
>
> I have [...] become maniacal about always
> using the full path name of an executable in processes promises, eg:
>
> processes:
>        "/usr/sbin/cupsd"
>                etc
>
> This avoids the "mycupsarefull" problem, and the
> more-common-than-you'd-think "an administrator is running ps ax | grep
> cupsd" problem.

Good!  Thanks for sharing that.

...
> An ideal way forward in my opinion would be for Cfengine to be able to
> "know" what the monitoring perceives about a service, either from the
> inside (I guess this is kind of cf-monitord's role, but could also just
> be calling Nagios plugins locally), or from the outside by interacting
> witht a monitoring system to get the current status (I recall that
> Cfengine and Zenoss have some integration, but not really on this subject).

I haven't played with cf-monitord yet.  In the meantime, I wouldn't mind running
Nagios plugins to reap information about the system but be aware that costs
more than doing it natively in Cfengine.  For example, you can put together
a Web client natively in Cfengine using readTcp and regcmp, for example:


-- start snippet --

# @webhosts_list is a list of web server hostnames

vars:

"my80" string => readtcp("$(web_server_hostname)","80","GET /index.php
HTTP/1.1$(const.r)$(const.n)Host:
$(web_server_hostname)$(const.r)$(const.n)$(const.r)$(const.n)",20);

classes:

"server_ok" expression => regcmp(".*200 OK.*\n.*","$(my80)");

-- end snippet --

Or you could run a command, like:

/usr/lib64/nagios/plugins/check_http -H www.google.com

I wish I had more time to explore cfengine and learn what cf-monitord
can do.  =)

Thank you for taking this conversation a step further!

Aleksey
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to