Follow

How To Change The Frequency of Modelling (Zenoss 4.x and below)

Applies To

  • Zenoss 4.x
  • Zenoss 3.x
  • Zenoss 2.x

Summary

Modeling refers to discovering information on a device. Modeling information is gathered by the zenmodeler daemon. This information can include basic configuration such as hardware model, OS information, serial numbers, and software inventory. It can also include components such as network interfaces and filesystems. After a device is modeled, performance monitoring daemons can use the modelling information to determine what to monitor, such as which filesystems to monitor or exclude from monitoring and how to monitor, for example using SNMP index.
Note: The ZenVMware zenpack is a special case that uses the zenvmwaremodeler daemon, and is not discussed here).

The zenmodeler daemon chooses the modeler plugins (these are called collector plugins in the GUI according to the zCollectorPlugins Z-property  prior to version 3.x). The daemon then runs the plugins against the device to gather the modeling information. The modeling information is then passed to zenhub to make changes to the ZODB database.
By default, modeling runs every 12 hours, starting from the time when the zenmodeler daemon starts. Because modeling can be processor / disk / resource intensive for both devices as well as the Zenoss server, manually scheduling the modeling process can be helpful in managing resources.

Procedures

The following procedures describe how to configure the modelling frequency for various Zenoss versions. Follow the instructions for your Zenoss version.

For Zenoss version 4.x

Perform the following to configure the modelling frequency using crontab:

  1. Stop the zenmodeler daemon on all collectors:
    • From the command line:
      Run the following command as the zenoss user:
      $ zenmodeler stop
    • From the Zenoss UI:
      1. Navigate to Advanced > Daemons on the left hand navigation bar.
      2. Click the Stop button for the zenmodeler daemon.
  2. Prevent zenmodeller from running when Zenoss starts up. Remove zenmodeler from the files that control zenmodeler startup:
    1. Edit the $ZENHOME/etc/daemons.txt file. Also the /$ZENHOME/etc/collectordaemons.txt:, if you are using it on the collectors.
    2. Locate and delete the zenmodeler line.
    3. Save and exit the file(s).
  3. Update the collectors to pick up the change. In the Zenoss UI:
    1. Navigate Advanced > Collectors.
    2. Select the remote collectors you want update from the right hand pane.
    3. Select the menu item Update Collector...
  4. Create a cron job on each collector for the zenoss user for zenmodeller. Add entries to crontab to schedule zenmodeler:
    Modify a crontab in /etc to determine when zenmodeller should run. For example, edit /etc/cron.daily/zenoss to add the job:
    # Remodel Zenoss devices on this collector.
    0 0 * * * bash -lc '/opt/zenoss/bin/*_zenmodeler run --daemon --now'


    Note: Use the "*_ " string if you have multiple collectors. Each collector has a collector1_zenmodeler collector2_zenmodeler. Remove the " *_" string if you have a single collector on the master.

For Zenoss versions 2.3.x, 3.x

Perform the following to change the modelling frequency using cron:

  1. Stop the zenmodeler daemon.

    To stop the currently-running zenmodeler daemon on each collector (you can only have one collector).

    • From the command line:
      Run the following command as the zenoss use:
      $ zenmodeler stop
    • For version 3.x:
      1. Navigate to Advanced > Daemons on the left hand navigation bar.
      2. Click the Stop button for the zenmodeler daemon.
    • For version 2.3-2.5.2:
      1. Navigating to Settings > Daemons tab.
      2. Click the Stop button for the zenmodeler daemon.
  2. Stop ZenModeler from being automatically restarted in the future.
    Remove the zenmodeler line from the $ZENHOME/etc/daemons.txt file so that it does not start automatically with the rest of Zenoss.

    If this file does not exist see article http://community.zenoss.org/docs/DOC-2491/

  3. Add a cronjob to schedule when ZenModeler runs.

    Add a cronjob for the zenoss user on each collector to schedule when you want the modeler to run.
    You'll want cronjobs like the following on each collector. Modify a crontab in /etc to determine when you want it to run. For example, edit /etc/cron.daily/zenoss to add the job:
    # Remodel Zenoss devices on this collector.
    0 0 * * * bash -lc '/opt/zenoss/bin/*_zenmodeler run --daemon --now'


    Note: Use the *_ if you have multiple collectors. Each collector has a collector1_zenmodeler collector2_zenmodeler. If you have a single collector on the master, you can remove the " *_" string.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk