Page 1 of 1
Users and contacts
Posted: Tue Aug 12, 2014 10:59 am
by luniversity
I've taken over management of our Nagios XI system and I've noticed the we have 41 users and only 37 contacts. I'm wondering if there is a simple way to identify users without contacts. I've poured through documentation ( admin guide, users guide, understanding users and contacts) but can't find what I'm looking for. I know I can sort through them manually. Just curious if there is a simpler way.
Re: Users and contacts
Posted: Tue Aug 12, 2014 5:05 pm
by tmcdonald
My bash skills are a bit rusty, but I used this to pull the relevant information regarding Users and Contacts that are in the CCM:
Code: Select all
XI_USERS=`echo "COPY (select username from xi_users) TO STDOUT WITH CSV" | psql nagiosxi nagiosxi | sort`
echo "$XI_USERS"
echo ""
CONTACTS=`echo "use nagiosql; select contact_name from tbl_contact" | mysql -N -u root -pnagiosxi | sort`
echo "$CONTACTS"
You can use that same logic to compare the arrays.
Re: Users and contacts
Posted: Thu Aug 14, 2014 12:54 pm
by luniversity
Exactly what I was looking for. Thank you much.