Quantcast
Channel: Zenoss Community: Message List
Viewing all articles
Browse latest Browse all 1118

Re: can zenoss automatically find the device in a network?

$
0
0

Correct - zendisc is not a daemon.  It is a process that you can run - either manually, via the GUI or through cron.  here is my jc_zendisc.sh script:

 

# Run zendisc logging to $ZENHOME/log/jc_zendisc.log

#

# This script must be run as the zenoss user

#

#set -x

# Setup the zenoss environment

 

. ~zenoss/.bashrc

 

# Zenoss parameters

zendiscLog="$ZENHOME/log/jc_zendisc.log"

 

echo `date '+%Y-%m-%d %H:%M:%S,000'` Starting zendisc run >> $zendiscLog 2>&1

 

# Next line only tries to discover single (already existing) device - for testing

 

#$ZENHOME/bin/zendisc run --now --monitor localhost --deviceclass /Server/Linux -d zen42.class.example.org >> $zendiscLog 2>&1

 

# Next line is zendisc command

# Discovers 10.0.0.0/24 plus subnets into class /AutoDiscovered, setting production state to PreProduction

$ZENHOME/bin/zendisc run --now --monitor localhost --deviceclass /AutoDiscovered  --subnets  --prod_state 500 --net 10.0.0.0/24 >> $zendiscLog 2>&1

 

echo `date '+%Y-%m-%d %H:%M:%S,000  '` zendisc run complete >> $zendiscLog

 

Then run this in cron:

 

03 23 * * * /opt/zenoss/local/jc_zendisc.sh

 

Obviously test this before putting into production.  In one installation I have seen the --prod_state 500 set everything in the scope of discovery to PreProduction, not just newly discovered devices - not sure why as it doesn't do this in my environment.

 

Cheers,

Jane


Viewing all articles
Browse latest Browse all 1118

Trending Articles