User Lock issue

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
aditya.c.anand
Posts: 56
Joined: Mon Mar 20, 2017 7:16 am

User Lock issue

Post by aditya.c.anand »

Hello Team,

Is there any plugin available to throw critical alert when the user oracle on server xyz is locked? Server is solaris 10.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: User Lock issue

Post by cdienger »

As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
SteveBeauchemin
Posts: 524
Joined: Mon Oct 14, 2013 7:19 pm

Re: User Lock issue

Post by SteveBeauchemin »

You mean like this?
(from consol labs if I'm allowed to note that)

./check_oracle_health --help
Copyright (c) 2008 Gerhard Lausser

Check various parameters of Oracle databases

--mode
the mode of the plugin. select one of the following keywords:
tnsping (Check the reachability of the server)
connection-time (Time to connect to the server)
password-expiration (Check the password expiry date for users)

Command definition:
/usr/bin/env TNS_ADMIN=/home/nagios LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib ORACLE_HOME=/usr/lib/oracle/11.2/client64 /usr/local/nagios/libexec/check_oracle_health --connect $_HOST_ORACLE_CONNECT$ --username $_HOST_ORACLE_USERNAME$ --password $_HOST_ORACLE_PASSWORD$ --mode $ARG1$ --warning $ARG2$ --critical $ARG3$ $ARG4$ $ARG5$

Service Def... uses the command

$ARG1$ = password-expiration
$ARG2$ = 14:
$ARG3$ = 2:
$ARG4$ = --name 'Some Regex to match name'
$ARG5$ = --regex
$ARG6$ = --noperfdata

Warning if account will expire in 14 days or less
Critical if account will expire is 2 days or less

At least this is what I do. Works great. You can figure out the rest...

Steve B
XI 5.7.3 / Core 4.4.6 / NagVis 1.9.8 / LiveStatus 1.5.0p11 / RRDCached 1.7.0 / Redis 3.2.8 /
SNMPTT / Gearman 0.33-7 / Mod_Gearman 3.0.7 / NLS 2.0.8 / NNA 2.3.1 /
NSClient 0.5.0 / NRPE Solaris 3.2.1 Linux 3.2.1 HPUX 3.2.1
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: User Lock issue

Post by cdienger »

@aditya.c.anand, does the password-expiration option pointed out by @SteveBeauchemin do what you need?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked