hey friends,<br>
<br>
I am using Nagions 2.0b on Fedora Core 3.I have configured
check_users to see how many users are currently login into the system.<br>
<br>
define command{<br>
command_name check_local_users<br>
command_line $USER1$/check_users -w 15 -c 10<br>
}<br>
<br>
Through the url <a href="http://localhost/nagios" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://localhost/nagios</a><br>
<br>
<table border="0">
<tbody><tr><td>Current Status:</td><td><div> OK </div></td></tr>
<tr><td>Status Information:</td><td>USERS OK - 0 users currently logged in</td></tr>
<tr><td>Performance Data:</td><td>users=0;15;10;0</td></tr>
<tr><td>Current Attempt:</td><td>1/5</td></tr>
<tr><td>State Type:</td><td>HARD</td></tr>
<tr><td>Last Check Type:</td><td>ACTIVE</td></tr>
<tr><td>Last Check Time:</td><td>11-10-2005 10:40:11</td></tr>
<tr><td>Status Data Age:</td><td> 0d 0h 1m 17s</td></tr>
<tr><td>Next Scheduled Active Check: </td><td>11-10-2005 10:45:11</td></tr>
<tr><td>Latency:</td><td>0.000 seconds</td></tr>
<tr><td>Check Duration:</td><td>0.005 seconds</td></tr>
<tr><td>Last State Change:</td><td>11-09-2005 16:39:17</td></tr>
<tr><td>Current State Duration:</td><td> 0d 18h 2m 11s</td></tr>
<tr><td>Last Service Notification:</td><td>N/A</td></tr>
<tr><td>Current Notification Number:</td><td>0</td></tr>
<tr><td>Is This Service Flapping?</td><td>N/A</td></tr>
<tr><td>Percent State Change:</td><td>N/A</td></tr>
<tr><td>In Scheduled Downtime?</td><td><div> NO </div></td></tr>
<tr><td>Last Update:</td><td>11-10-2005 10:41:14</td></tr>
</tbody>
</table>
<table border="0">
<tbody><tr><td>Active Checks:</td><td><div> ENABLED </div></td></tr>
<tr><td>Passive Checks:</td><td><div> ENABLED </div></td></tr>
<tr><td>Obsessing:</td><td><div> ENABLED </div></td></tr>
<tr><td>Notifications:</td><td><div> ENABLED </div></td></tr>
<tr><td>Event Handler:</td><td><div> ENABLED </div></td></tr>
<tr><td>Flap Detection:</td><td><div> ENABLED </div></td></tr></tbody>
</table>
<br>
<br>
But If I run the check_users from command line it shows there are users<br>
<br>
./check_users -w 10 -c 15<br>
USERS OK - 5 users currently logged in |users=5;10;15;0<br>
<br>
in services.cfg I have added these lines for check_users service<br>
<br>
define service{<br>
host_name cluster1<br>
service_description localuserload<br>
check_command check_local_users<br>
max_check_attempts 5<br>
normal_check_interval 5<br>
retry_check_interval 3<br>
check_period nonworkhours<br>
notification_interval 30<br>
notification_period nonworkhours<br>
notification_options w,c,r<br>
contact_groups linux-admins<br>
}<br>
<br>
Please let me know if you need any further inputs.<br>
<br>
Can you guide me what wrong I am doing ?<br>
<br>
Thanks & Regards<br>
<span class="sg">
<br>
Ankush Grover<br>
<br>
</span>