YADBGT – Yet Another DataBase Grepping Tool

I’ve seen this before but finally used it. SK. Got it from our Diamond guy Taylor. Had to modify to make it work. You can use guidbedit to see all the fields you can grep.

Outputs all the gateways in the DMS database with their name, ip, appliance/open type, version number.

Wish they had this
# Check Point environment variables
. /opt/CPshared/5.0/tmp/.CPprofile.sh
# go to MDS context
mdsenv
mcd
# iterate over the customers

for CMA_NAME in $(ls -1 $MDSDIR/customers)
do
mdsenv ${CMA_NAME}
mcd 1>> /dev/null 2>> /dev/null
echo ” ”
echo “Security Gateways on CMA ${CMA_NAME} :”
echo “———————-”
$MDSDIR/bin/cpmiquerybin attr “” network_objects “type=’gateway’|type=’cluster_member’|type=’gateway_cluster'” -a __name__,ipaddr,svn_version_name,appliance_type
echo
done
exit

fwinventory

Advertisements
Post a comment or leave a trackback: Trackback URL.

Comments

  • Ed Marciniak  On October 30, 2014 at 11:54 pm

    One could also add a new entry to the conf file for mdsquerydb since mdsquerydb is actually a script thats sets up parameters before calling cpmiquerybin.

Trackbacks

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

blog.lachmann.org

Michael Endrizzi's - St. Paul MN - CheckPoint blog on topics related to Check Point products and security in general.

%d bloggers like this: