Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I add a new template ? #98

Closed
tjyang opened this issue Jul 3, 2018 · 4 comments
Closed

How do I add a new template ? #98

tjyang opened this issue Jul 3, 2018 · 4 comments

Comments

@tjyang
Copy link

tjyang commented Jul 3, 2018

Hi
I can't figure out how to create a new template(ex. for IPMI devices) ?
I clone an existing template in /usr/share/okconfig/templates/linux directory into /usr/share/okconfig/templates/ipmi.
But the okconfig listtempaltes wouldn't list out the hew ipmi template ?
How do I register the newly clone ipmi template ?

R1: https://github.com/opinkerfi/okconfig/tree/master/usr/share/okconfig/templates

@ghost ghost mentioned this issue Jul 3, 2018
@hakong
Copy link
Contributor

hakong commented Jul 3, 2018

Try creating the template in /etc/nagios/okconfig/examples. This is where I keep all my custom templates.

@pall-valmundsson
Copy link
Contributor

The templating of hosts is done using the .cfg-example files. Try to copy the linux.cfg-example directory into /etc/nagios/okconfig/examples directory as ipmi.cfg-example and go from there.

ps. a poorly documented feature is that you can override the global templates in /usr/share/okconfig/examples by having an example file of the same name in the /etc/nagios/okconfig/examples, that way changes won't revert if you update the okconfig package.

@tjyang
Copy link
Author

tjyang commented Jul 3, 2018

Thanks for @pall-valmundsson @hakong quick responses.

In .cfg-example, I know "HOSTNAME" will be replaced by actual hostname after running okconfig

     host_name              HOSTNAME
       alias                HOSTNAME
        address                192.168.11.18

Question is what is the macro/variable name for "address''s IP(192.168.11.18) that will be replaced with actual IP address of a host ?

@tjyang
Copy link
Author

tjyang commented Jul 3, 2018

cancel above bad question, "192.168.11.18" is filled by nslookup.

@tjyang tjyang closed this as completed Jul 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants