Nagios configuration error
-
parveenfathima.m
- Posts: 5
- Joined: Thu Aug 21, 2014 1:54 am
Nagios configuration error
Hi guys,
I am new to nagios monitoring tool. I successfully tested the predefined monitoring wizard given by nagios. Now i am decided to create a custom plugin using java. I created that, But i can't able to deploy my custom plugin into nagios. Help me how to solve it.
I am new to nagios monitoring tool. I successfully tested the predefined monitoring wizard given by nagios. Now i am decided to create a custom plugin using java. I created that, But i can't able to deploy my custom plugin into nagios. Help me how to solve it.
Re: Nagios configuration error
What steps have you taken so far and where is it failing?
Did you follow this guide?
http://assets.nagios.com/downloads/nagi ... ios-XI.pdf
Did you follow this guide?
http://assets.nagios.com/downloads/nagi ... ios-XI.pdf
Former Nagios employee
-
parveenfathima.m
- Posts: 5
- Joined: Thu Aug 21, 2014 1:54 am
Re: Nagios configuration error
HI,
Yes i followed the link for as you gave. I have attached following steps to make a deployment,
1. Install jnrpe server and jcheck server into nagiox server machine.
2. Then go to change the file jnrpe.ini located inside of jnrpe server->etc folder. To insert a below line under [commands] and removing older one in jnrpe.ini file.
check_disk : CHECK_DISK -d $ARG1$ -w $ARG2$ -c $ARG3$
3. Make one directory to store our custom plugin.
path must be, jnrpe_server -> plugins -> tutorial(custom folder name) -> put the jar into this location.
3. start the jnrpe server service using following command.
./jnrpe -c ../etc/jnrpe.ini
4. After service started then goto jcheck_nrpe location for running the plugin.
cd /tmp/jcheck_nrpe-2.0.3-RC3/bin
./jcheck_nrpe -H localhost -c-n -c check_disk -d /tmp :100000 :50000
Yes i followed the link for as you gave. I have attached following steps to make a deployment,
1. Install jnrpe server and jcheck server into nagiox server machine.
2. Then go to change the file jnrpe.ini located inside of jnrpe server->etc folder. To insert a below line under [commands] and removing older one in jnrpe.ini file.
check_disk : CHECK_DISK -d $ARG1$ -w $ARG2$ -c $ARG3$
3. Make one directory to store our custom plugin.
path must be, jnrpe_server -> plugins -> tutorial(custom folder name) -> put the jar into this location.
3. start the jnrpe server service using following command.
./jnrpe -c ../etc/jnrpe.ini
4. After service started then goto jcheck_nrpe location for running the plugin.
cd /tmp/jcheck_nrpe-2.0.3-RC3/bin
./jcheck_nrpe -H localhost -c-n -c check_disk -d /tmp :100000 :50000
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Nagios configuration error
What responses are you getting when attempting to run the final command? Are there any logs with the jnrpe package? Sorry this is the first I've heard of nrpe in java, and I would strongly suggest using the base nrpe package instead unless you really need a java based environment for something, check_disk is a standard plugin and should not need java.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
-
parveenfathima.m
- Posts: 5
- Joined: Thu Aug 21, 2014 1:54 am
Re: Nagios configuration error
hi guys,
"bad file (invalid format)" can be display when running the plugin on nagios xi server.
"bad file (invalid format)" can be display when running the plugin on nagios xi server.
Re: Nagios configuration error
Is there a reason why this was written in java? We would need to see the plugin to even begin troubleshooting as it is a custom thing. But just to reiterate, disk checking in no way requires java, and we already include similar checks for all major platforms by default in XI.
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.
-
parveenfathima.m
- Posts: 5
- Joined: Thu Aug 21, 2014 1:54 am
Re: Nagios configuration error
Hi,
I have the requirements are based on java language, for that i used java. can u tell me if nagios can monitor jar file script?. If possible means send me some of the related links. i searched a lot, but i can't get the clear idea about to create a java custom plugin using nagios.
I have the requirements are based on java language, for that i used java. can u tell me if nagios can monitor jar file script?. If possible means send me some of the related links. i searched a lot, but i can't get the clear idea about to create a java custom plugin using nagios.
Re: Nagios configuration error
First, how are you running the plugin - through which agent?
NRPE, NSCA, NCPA, NSClient, check_by_ssh, locally on the XI server, etc. . .
Next, are you following the plugin dev guidelines?
https://nagios-plugins.org/doc/guidelines.html
NRPE, NSCA, NCPA, NSClient, check_by_ssh, locally on the XI server, etc. . .
Next, are you following the plugin dev guidelines?
https://nagios-plugins.org/doc/guidelines.html
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.
Re: Nagios configuration error
I'm a bit late with the answer, but I prefer to add the answer so that other people can find it here.
I'm the founder of the JNRPE project.
What's wrong in your installation is the command you use.
Infact you say you use the command:
Have you tried to execute it on the command line? It won't work.
jcheck_nrpe has exactly the same syntax as check_nrpe, so you will have to run it with:
Moreover, JNRPE is fully compatible with NRPE, so I would suggest you use check_nrpe to invoke commands on JNRPE:
(jcheck_nrpe is provided for systems where check_nrpe is not available)
Regards,
Massimiliano
I'm the founder of the JNRPE project.
What's wrong in your installation is the command you use.
Infact you say you use the command:
Code: Select all
./jcheck_nrpe -H localhost -c-n -c check_disk -d /tmp :100000 :50000jcheck_nrpe has exactly the same syntax as check_nrpe, so you will have to run it with:
Code: Select all
./jcheck_nrpe -H localhost -n -c check_disk -a /tmp :100000 :50000Code: Select all
./check_nrpe -H localhost -n -c check_disk -a /tmp :100000 :50000Regards,
Massimiliano
Re: Nagios configuration error
Thanks for the additional info!
OP: Did ziccardi's fix work for you?
OP: Did ziccardi's fix work for you?
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.