Search found 9 matches

by stn021
Thu Mar 27, 2014 5:06 pm
Forum: Open Source Nagios Projects
Topic: Is it possible to use Variables in definition files?
Replies: 9
Views: 3390

Re: Is it possible to use Variables in definition files?

tmcdonald wrote:Are you asking a question or just stating that you are going to try some things?
That was shorthand for "thank you all for the valuable hints and I will now now explore the numerous possibilies to make config files shorter". Sorry, was in a bit of a hurry :)
by stn021
Thu Mar 27, 2014 4:22 pm
Forum: Open Source Nagios Projects
Topic: Is it possible to use Variables in definition files?
Replies: 9
Views: 3390

Re: Is it possible to use Variables in definition files?

technick wrote:
stn021 wrote:
abrist wrote:
  • Is there a way to duplicate the complete config of a host without having to copy every codeblock (define host{}, define service{}) individually ?
Yes, you can use templates to save yourself A LOT of time. Here is a quick example of ..
Ok, lets See what else is possible...
by stn021
Wed Mar 26, 2014 10:27 am
Forum: Open Source Nagios Projects
Topic: Is it possible to use Variables in definition files?
Replies: 9
Views: 3390

Re: Is it possible to use Variables in definition files?

Custom variable are intended to be passed to plugins/scripts/etc. They are not intended for use as values for config directives and by all accounts, should not work in the method you are attempting. No, they don't, apparently :( Let me rephrase my question. I have several identical hosts with ident...
by stn021
Wed Mar 26, 2014 10:13 am
Forum: Open Source Nagios Projects
Topic: Is it possible to use Variables in definition files?
Replies: 9
Views: 3390

Re: Is it possible to use Variables in definition files?

You can look at /usr/local/nagios/var/objects.cache and view your custom variable. Very cool, thank you. That files list every defined object with all its properties. Allows a quick check of config-changes. (Side note: In my installation of nagios-core this file is in a different location /var/cach...
by stn021
Tue Mar 25, 2014 12:44 pm
Forum: Open Source Nagios Projects
Topic: Is it possible to use Variables in definition files?
Replies: 9
Views: 3390

Is it possible to use Variables in definition files?

Hi, as described in http://nagios.sourceforge.net/docs/3_0/customobjectvars.html variables can be used in nagios definitions. I tried that and it doesn't seem to work. The defined variable is interpreted as "0". Here is what I did: define service{ _CHECK_INTERVAL 77 } # and: define service...
by stn021
Thu Mar 13, 2014 7:30 am
Forum: Nagios XI
Topic: check_by_ssh with alternate username ?
Replies: 9
Views: 4592

Re: check_by_ssh with alternate username ?

Hi, thanks for all the replies. Got is working: SSH-login and remote command-execution work On the nagios-host: [root@localhost libexec]# su nagios # run ssh-keygen , to the default file /home/nagios/.ssh/id_rsa # on the NAS: insert contents ot /home/nagios/.ssh/id_rsa into into /root/.ssh/authorize...
by stn021
Wed Mar 12, 2014 5:57 am
Forum: Nagios XI
Topic: check_by_ssh with alternate username ?
Replies: 9
Views: 4592

Re: check_by_ssh with alternate username ?

What you need to edit are the nagios config files. .. Thank you for the info. No, the configfiles are not 'it' . The existing configurationfiles for the NAS are in //usr/local/nagios/etc/services and /usr/local/nagios/etc/hosts There is the reference to the command that is executed on the NAS check...
by stn021
Tue Mar 11, 2014 12:27 pm
Forum: Nagios XI
Topic: check_by_ssh with alternate username ?
Replies: 9
Views: 4592

Re: check_by_ssh with alternate username ?

[/list] The -l flag should do what you are looking for. Note that you will need to enable password-less login with ssh keys and ssh in at least once to accept the remote ssh key as the nagios user on the nagios system. Hi, thank you for the info. I did keep my initial question kind of short :) So he...
by stn021
Tue Mar 11, 2014 6:45 am
Forum: Nagios XI
Topic: check_by_ssh with alternate username ?
Replies: 9
Views: 4592

check_by_ssh with alternate username ?

Hi, this is about checking a QNAP TS-669 pro, a NAS system with linux-OS with Nagios XI. It would be best IMHO to use ssh to check the NAS. Nagios XI has a config-wizard for this. Unfortunately the NAS will not allow any user other than 'admin' to log in by ssh. And nagios seems to insist on using '...