Pandora FMS community forums
du grep module - Printable Version

+- Pandora FMS community forums (https://pandorafms.org/forum)
+-- Forum: Pandora FMS (https://pandorafms.org/forum/forum-3.html)
+--- Forum: General monitoring discussion (https://pandorafms.org/forum/forum-6.html)
+--- Thread: du grep module (/thread-7532.html)

Pages: 1 2


du grep module - g3ko - 07-28-2014

Hi Guys,

I'm trying to get the du grep command to work as a module but I'm having no luck. I can get the command to work fine as an administrator in CMD. But I haven't found a way of the agent to get it to work.

Any ideas?

[img]https://pbs.twimg.com/media/Btnw6UnIcAAjORi.png:large[/img]


Re: du grep module - ivo_yordanov - 07-28-2014

Hello

Can you try with the following: du -q d: \WSUS | grep Size: | gawk '{print $2}'  ?

Regards
Ivo


Re: du grep module - g3ko - 07-29-2014

Tried both of the module_exec below:

#FOLDER SIZE
module_begin
module_name Folder size WSUS
#module_description Folder Size of WSUS
module_type generic_data
#module_exec du -q d: WSUS | grep Size: | gawk "{print $2}"
module_exec du -q d: \WSUS | grep Size: | gawk '{print $2}'
module_end

and I still get the timed out message in the pandora log.
2014-07-29 09:47:34 Pandora_Module_Exec: Folder size WSUS timed out (retcode: 259)



Re: du grep module - ivo_yordanov - 07-29-2014

Hello

I've looked through for Folder size WSUS timed out problem and I've came with the following:
[url=http://blogs.technet.com/b/gborger/archive/2009/02/27/what-to-do-when-your-wsuscontent-folder-grows-too-large.aspx]http://blogs.technet.com/b/gborger/archive/2009/02/27/what-to-do-when-your-wsuscontent-folder-grows-too-large.aspx[/url]

Regards
Ivo


Re: du grep module - g3ko - 07-29-2014

I have tried monitoring a folder called webspace which is about 10mb in size & I get the same message. So I think it's not folder size causing the timeout.

Could this be permission based?


Re: du grep module - ivo_yordanov - 07-29-2014

Hello

It is possible to be a permission issue but I am talking hypothetically here.  Is the system a 64 or a 32 bit system and witch is the version for the agent?

Regards
Ivo


Re: du grep module - g3ko - 07-29-2014

Hi,

System is:
Windows Server 2012 R2 64bit

Pandora is:
Agent 5.1 32bit

I can always try running this on another system though ideally it will be used in production on a 2012 R2 server.




Re: du grep module - ivo_yordanov - 07-29-2014

Hello

I think I see what the issue is now. The 32 bits agent execute all modules in a 32 bits powershel when it should execute them in a 64 one. Is it possible for you to update to the 64 bits agent?


Regards
Ivo


Re: du grep module - g3ko - 07-29-2014

certainly. I will update and post the results back here shortly.


Re: du grep module - g3ko - 07-30-2014

Hi, Same problem running the 64bit pandora agent. I wonder if I should try an older agent?