File download Using NRPE

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
harsha.s.aryan
Posts: 52
Joined: Fri Nov 13, 2015 9:05 am

File download Using NRPE

Post by harsha.s.aryan »

Hi,

is there any plugin where i can download a file from every nagios clients (NRPE).

Harsha S
Regards,
Harsha
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: File download Using NRPE

Post by eloyd »

Not really. NRPE is a protocol that allows Nagios to request information from an NRPE agent running on a remote server, and return a Nagios plugin result. Those results are typically short, one line output designed to be used in a page or SMS text message for alerts. They are not files. Also, Nagios is a monitoring tool, not a file management tool, so having it download a file would take time, and Nagios may prematurely terminate the connection because it takes too much time - or at least, more time than it thinks that a service check should take.

So the bottom line is that if you are looking to transfer files, Nagios is not a good tool for that, and NRPE is just a communications protocol, not a file transfer mechanism.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
harsha.s.aryan
Posts: 52
Joined: Fri Nov 13, 2015 9:05 am

Re: File download Using NRPE

Post by harsha.s.aryan »

this is not exactly for file transfer

i have a script and the output is more than 10 lines but in nrpe output is not coming completely.

is there any way to get the output of the complete file
Regards,
Harsha
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: File download Using NRPE

Post by eloyd »

My first question would be, do you really need to capture all that output? My second question would be, can you use a different plugin?

NRPE has a limitation on the number of characters it will send back, so it's likely that you will not be able to do what you need with NRPE. Remember, Nagios plugin outputs are supposed to be short and concise.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
harsha.s.aryan
Posts: 52
Joined: Fri Nov 13, 2015 9:05 am

Re: File download Using NRPE

Post by harsha.s.aryan »

yes i want to capture complete the output.

is there any other way where i can capture the complete output. or what is the max output NRPE can provide
Regards,
Harsha
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: File download Using NRPE

Post by eloyd »

Can you share what the plugin does and what the output is supposed to be? This might help us better understand what you are trying to do.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
harsha.s.aryan
Posts: 52
Joined: Fri Nov 13, 2015 9:05 am

Re: File download Using NRPE

Post by harsha.s.aryan »

its not a plugin,
its a script which will check all users in linux and give the status of all users.
if needed i will share the script
Regards,
Harsha
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: File download Using NRPE

Post by lmiltchev »

i have a script and the output is more than 10 lines but in nrpe output is not coming completely.

is there any way to get the output of the complete file
Outputting more than 10 lines shouldn't be an issue...

On the client:

Code: Select all

command[catfile]=cat /tmp/test
On the Nagios server:

Code: Select all

[root@localhost libexec]# ./check_nrpe -H x.x.x.x -c catfile
This is line 1
This is line 2
This is line 3
This is line 4
This is line 5
This is line 6
This is line 7
This is line 8
This is line 9
This is line 10
This is line 11

[root@localhost libexec]#
The question should be how many characters are you trying to output?
Be sure to check out our Knowledgebase for helpful articles and solutions!
harsha.s.aryan
Posts: 52
Joined: Fri Nov 13, 2015 9:05 am

Re: File download Using NRPE

Post by harsha.s.aryan »

output may come max up to 2000 char will it work?
Regards,
Harsha
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: File download Using NRPE

Post by hsmith »

I believe we are limited to 1024 characters right now. We have a version coming out that should resolve this in the future. If you're interested, check it out here: https://github.com/NagiosEnterprises/nr ... pe-3.0-RC2

Please note that the amount of support we can provide for a RC version is very limited, and if you believe you find a bug/issue, you should post it on the GitHub page.
Former Nagios Employee.
me.
Locked