How to put a plugin in use
-
ziedmahjoub
- Posts: 142
- Joined: Fri Jan 16, 2015 5:22 am
How to put a plugin in use
Hi,
i have installed Nagios Core 4.0.8 and plugins 2.0.3 !! and i want to add some plugins ! so i have downloaded one (check AVG) antivirus , a .php file , but after downloading it i didn't know what to do ,
and what i must modify to put it in use .
Can someone guid me , or give me a tutorial that can help me !!
thanks
i have installed Nagios Core 4.0.8 and plugins 2.0.3 !! and i want to add some plugins ! so i have downloaded one (check AVG) antivirus , a .php file , but after downloading it i didn't know what to do ,
and what i must modify to put it in use .
Can someone guid me , or give me a tutorial that can help me !!
thanks
Re: How to put a plugin in use
You might want to take a look at a general Nagios tutorial, as this can be quite an in-depth topic:
http://tuxradar.com/content/nagios-made-easy
http://tuxradar.com/content/nagios-made-easy
Former Nagios employee
-
ziedmahjoub
- Posts: 142
- Joined: Fri Jan 16, 2015 5:22 am
Re: How to put a plugin in use
I've seen it , but i didn't understand many things , its advanced for me i think , because i still new to nagios .tmcdonald wrote:You might want to take a look at a general Nagios tutorial, as this can be quite an in-depth topic:
http://tuxradar.com/content/nagios-made-easy
i just want to know if i download a plugin how can i intergrate it , in which config file ?
Re: How to put a plugin in use
You will need to copy the plugin to your plugins directory and change the permissions if you need to. With most of the nagios plugins, you can run the "-h" or "--help" flag to view the usage, for example:I've seen it , but i didn't understand many things , its advanced for me i think , because i still new to nagios .
i just want to know if i download a plugin how can i intergrate it , in which config file ?
Code: Select all
/path/to/the/plugins/direcotry/<your plugin> -hCode: Select all
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfgYou can find the Nagios Core documentation here:
http://nagios.sourceforge.net/docs/nagi ... n/toc.html
It can take a lot of work to get nagios configured, especially if you are new to it. If this is too difficult for you, try Nagios XI. It is a lot easier than Nagios Core. You can run monitoring wizards and the configs will be generated for you automatically.
http://www.nagios.com/
Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
ziedmahjoub
- Posts: 142
- Joined: Fri Jan 16, 2015 5:22 am
Re: How to put a plugin in use
the path of the plugins directory can be this ? :You will need to copy the plugin to your plugins directory and change the permissions if you need to. With most of the nagios plugins, you can run the "-h" or "--help" flag to view the usage, for example:
Code: Select all
/path/to/the/plugins/direcotry/<your plugin> -h
Code: Select all
/usr/local/nagios/libexec-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: How to put a plugin in use
Yes, can you execute your plugin with the -h to see if there is instructions on how to run from the command line?ziedmahjoub wrote:
the path of the plugins directory can be this ? :for the permissions i will give them full permission to avoid problems.Code: Select all
/usr/local/nagios/libexec
Code: Select all
/usr/local/nagios/libexec/<your plugin> -h-
ziedmahjoub
- Posts: 142
- Joined: Fri Jan 16, 2015 5:22 am
Re: How to put a plugin in use
just a question :
there is some plugins that is written : compatible with nagios 3.x or nagios 2.x !!
meanwhile i have installed nagios core 4.0.8 , these plugins can work with nagios 4.x ?!!
there is some plugins that is written : compatible with nagios 3.x or nagios 2.x !!
meanwhile i have installed nagios core 4.0.8 , these plugins can work with nagios 4.x ?!!
Re: How to put a plugin in use
Yes, the plugin format has not changed for quite some time. All of those should work with 4.x.x.ziedmahjoub wrote:there is some plugins that is written : compatible with nagios 3.x or nagios 2.x !!
meanwhile i have installed nagios core 4.0.8 , these plugins can work with nagios 4.x ?!!
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
ziedmahjoub
- Posts: 142
- Joined: Fri Jan 16, 2015 5:22 am
Re: How to put a plugin in use
ok thanks , for now i have added this plugin just to test if i can put new plugins and make them work .
i added this one : http://exchange.nagios.org/directory/Pl ... ld/details (file .pl)
and i added this command in commands.cfg :
and this service in windows.cfg :
and in the web interface i find a new service called Check SQL , is that means that the plugin is successfully injected ?
i added this one : http://exchange.nagios.org/directory/Pl ... ld/details (file .pl)
and i added this command in commands.cfg :
Code: Select all
define command{
command_name check_mysqld
command_line $USER1$/check_mysqld.pl -H $HOSTADDRESS$ -u $ARG1$ -p $ARG2$
}Code: Select all
define service {
use generic-service
hostgroup_name mysql
service_description check SQL
check_command check_mysqld!foo!apples
}Re: How to put a plugin in use
That looks about right!
Give it a few minutes to see if it is running properly and check the output/status info.
Give it a few minutes to see if it is running properly and check the output/status info.
Former Nagios employee