<div dir="ltr">Well, as far as the client side goes, I think the best you can get is to write a script that checks for specific output in /var/log/osad, but to get any useful data, you need to increase the verbosity of debugging in /etc/sysconfig/osad.conf<div>
<br></div><div>I run a report daily for all systems in my Spacewalk environment, which dumps out the hostnames and OSAD status of everything registered into a csv file, which I feed in to a dashboard. It's a simple python script but might provide the information you're looking for. It uses the API getDetails method which has an entry for osad_status in the array. As the last person said, monitoring last ping requests would be rather difficult.. but you could enable more logging on /etc/init.d/jabberd and have it write debug logs to /var/lib/jabberd/log. These logs grow tremendously if you have more than 1000 systems registered however.. so use caution.. jabber is a very chatty protocol. </div>
<div><br></div><div><br></div><div><br></div><div>Here is the script I use to dump osad status for all my clients:</div><div><br></div><div><br></div><div><div>#!/usr/bin/python</div><div><br></div><div>import xmlrpclib</div>
<div>import os</div><div>import sys</div><div>import ConfigParser</div><div><br></div><div>cfg_file="/etc/rhn/rhn-api-user.conf"</div><div>config = ConfigParser.ConfigParser()</div><div>try:</div><div>    config.read (cfg_file)</div>
<div>except:</div><div>    print "Could not read config file %s." % cfg_file</div><div>    sys.exit(1)</div><div>try:</div><div>    spw_server = config.get ('Spacewalk', 'spw_server')</div><div>    spw_user = config.get ('Spacewalk', 'spw_user')</div>
<div>    spw_pass = config.get ('Spacewalk', 'spw_pass')</div><div>except:</div><div>    print "The file %s seems not to be a valid config file." % options.cfg_file</div><div>    sys.exit(1)</div>
<div><br></div><div><br></div><div>SATELLITE_URL = "http://{0}/rpc/api".format(spw_server)</div><div>SATELLITE_LOGIN = spw_user</div><div>SATELLITE_PASSWORD = spw_pass</div><div>client = xmlrpclib.Server(SATELLITE_URL, verbose=0)</div>
<div>key = client.auth.login(SATELLITE_LOGIN, SATELLITE_PASSWORD)</div><div><br></div><div>print "hostname,status"</div><div>systems = client.system.listSystems(key)</div><div>for system in systems:</div><div>        hostname = system['name']</div>
<div>        id = system['id']</div><div>        details = client.system.getDetails(key, id)</div><div>        status = details['osa_status']</div><div>        print "%s,%s" % (hostname, status)</div>
<div><br></div><div>client.auth.logout(key)</div></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 21, 2014 at 4:27 AM, Milan Zázrivec <span dir="ltr"><<a href="mailto:mzazrivec@redhat.com" target="_blank">mzazrivec@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Thursday 10 April 2014 11:34:41 Innes, Duncan wrote:<br>
> Hi folks,<br>
><br>
> Is there a way of checking the connectivity status of osad from the<br>
> client side?  I know I can query the Satellite to show the OSA Status of<br>
> each client, but am wondering about being able to do this on the client<br>
> side so that (for example) a Nagios check can be built for all RHEL<br>
> systems.<br>
><br>
> I think I need something more refined than just "service osad status".<br>
> Something that shows the last ping request from osa-dispatcher that the<br>
> client successfully responded to perhaps?<br>
<br>
</div>Monitoring the success of ping requests -- long shot. Not quite sure how<br>
you'd go about this really.<br>
<br>
You can monitor the network connection between osad and c2s on your<br>
Spacewalk / Spacewalk proxy or you can be periodically scheduling a remote<br>
command on your clients and monitoring the results (a time stamp of<br>
a file created on the client for example).<br>
<br>
-MZ<br>
<br>
_______________________________________________<br>
Spacewalk-list mailing list<br>
<a href="mailto:Spacewalk-list@redhat.com">Spacewalk-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br>
</blockquote></div><br></div>