Templates

20 views
Skip to first unread message

Abhinav Upadhyay

unread,
Aug 3, 2012, 5:38:51 AM8/3/12
to pynag-...@googlegroups.com
Hi,

Looking at the source code of the Model module, I came across the reference of templates at a few places. For example line #568 in __init.py__. I would like to know what the template means in this context ? 

Thanks
Abhinav

Tomas Edwardsson

unread,
Aug 3, 2012, 6:13:22 AM8/3/12
to pynag-...@googlegroups.com
Templates are usually something that has a "name" and "register 0", see http://nagios.sourceforge.net/docs/3_0/objectinheritance.html

The suggested filename for those unregistered services is %pynag_directory%/templates/%object_type%.

Might look something like /etc/nagios/pynag/templates/host.cfg:

define host {
  name generic-lawnmower
  notification_period sunny-days
  register 0
}

Hope this is clear as mud.. ;-)

---
Tommi
Reply all
Reply to author
Forward
0 new messages