Xymon Mailing List Archive search

Could not determine size of directory

7 messages in this thread

list Kris Springer · Fri, 8 Sep 2023 13:26:17 -0600 ·
Anyone have a clue why the following folder size can't be determined when I add it to analysis.cfg and client-local.cfg ?

"C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\LOGS"
Could not determine size of directory "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\LOGS"

These other folders are working fine.
C:\inetpub\logs
C:\Windows\Temp
C:\Windows\Logs\CBS
C:\ProgramData\Microsoft\Windows\WER

The only difference I see is spaces in the path.? I've put "" around it, but that doesn't seem to fix it.
Does someone have a working example that includes spaces in the path?

-- 
Kris Springer
list Rod · Fri, 8 Sep 2023 15:45:34 -0400 ·
On Fri, Sep 8, 2023 at 15:32 Kris Springer <user-c2caa0a7a8d5@xymon.invalid>
quoted from Kris Springer
wrote:
Anyone have a clue why the following folder size can't be determined when
I add it to analysis.cfg and client-local.cfg ?

"C:\Program Files\Common Files\microsoft shared\Web Server
Extensions\15\LOGS"
Could not determine size of directory "C:\Program Files\Common
Files\microsoft shared\Web Server Extensions\15\LOGS"

These other folders are working fine.
C:\inetpub\logs
C:\Windows\Temp
C:\Windows\Logs\CBS
C:\ProgramData\Microsoft\Windows\WER

The only difference I see is spaces in the path.  I've put "" around it,
but that doesn't seem to fix it.
Does someone have a working example that includes spaces in the path?


--
Kris Springer

list Jeremy Laidman · Sat, 9 Sep 2023 12:51:42 +1000 ·
On Sat, 9 Sept 2023 at 05:32, Kris Springer <user-c2caa0a7a8d5@xymon.invalid>
quoted from Rod
wrote:
Anyone have a clue why the following folder size can't be determined when
I add it to analysis.cfg and client-local.cfg ?

"C:\Program Files\Common Files\microsoft shared\Web Server
Extensions\15\LOGS"
Could not determine size of directory "C:\Program Files\Common
Files\microsoft shared\Web Server Extensions\15\LOGS"

These other folders are working fine.
C:\inetpub\logs
C:\Windows\Temp
C:\Windows\Logs\CBS
C:\ProgramData\Microsoft\Windows\WER

The only difference I see is spaces in the path.  I've put "" around it,
but that doesn't seem to fix it.
Does someone have a working example that includes spaces in the path?
Sorry, I don't have any examples to offer.

What does the directory's section in your client data message look like?
And your entries in analysis.cfg and client-local.cfg?

You might be able to "match" the dirname with a regex, something like:

DIR
"%^C:.Program.Files.Common.Files.microsoft.shared.Web.Server.Extensions.15.LOGS"
SIZE<65000

J
list Kris Springer · Fri, 8 Sep 2023 20:57:58 -0600 ·
analysis.cfg entry.
DIR???? "C:\Program Files\Common Files\microsoft shared\Web Server 
Extensions\15\LOGS" red size<2000000 TRACK=SPlogs

client-local.cfg entry.
dir:"C:\Program Files\Common Files\microsoft shared\Web Server 
Extensions\15\LOGS"


Kris Springer
quoted from Jeremy Laidman

On 9/8/23 20:51, Jeremy Laidman wrote:
On Sat, 9 Sept 2023 at 05:32, Kris Springer 
<user-c2caa0a7a8d5@xymon.invalid> wrote:

    Anyone have a clue why the following folder size can't be
    determined when I add it to analysis.cfg and client-local.cfg ?

    "C:\Program Files\Common Files\microsoft shared\Web Server
    Extensions\15\LOGS"
    Could not determine size of directory "C:\Program Files\Common
    Files\microsoft shared\Web Server Extensions\15\LOGS"

    These other folders are working fine.
    C:\inetpub\logs
    C:\Windows\Temp
    C:\Windows\Logs\CBS
    C:\ProgramData\Microsoft\Windows\WER

    The only difference I see is spaces in the path.? I've put ""
    around it, but that doesn't seem to fix it.
    Does someone have a working example that includes spaces in the path?


Sorry, I don't have any examples to offer.

What does the directory's section in your client data message look 
like? And your entries in analysis.cfg and client-local.cfg?

You might be able to "match" the dirname with a regex, something like:

DIR 
"%^C:.Program.Files.Common.Files.microsoft.shared.Web.Server.Extensions.15.LOGS" 
SIZE<65000

J
list Kris Springer · Thu, 5 Oct 2023 07:56:05 -0600 ·
Just to close the loop on this topic, I finally got this working by creating a 'directory junction' symbolic link in a folder without spaces that points to the folder path that has all the spaces in the name.? Then I have the Xymon server test my symlink instead of the real path because I could never get it to work any other way. Here's some examples.

In Windows host:
Use CMD to make 'junction' symlink to folder you want.
mklink /J C:\ProgramData\SPlogs ?C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\LOGS?

In Xymon server:
In client-local.cfg file.
 ?? ?dir:C:\ProgramData\SPlogs\TaskUsage

In analysis.cfg file.
 ?? ?DIR???? C:\ProgramData\SPlogs\TaskUsage red size<2000000 TRACK=TaskUsage
quoted from Kris Springer

Kris Springer


On 9/8/23 20:51, Jeremy Laidman wrote:
On Sat, 9 Sept 2023 at 05:32, Kris Springer <user-c2caa0a7a8d5@xymon.invalid> wrote:

    Anyone have a clue why the following folder size can't be
    determined when I add it to analysis.cfg and client-local.cfg ?

    "C:\Program Files\Common Files\microsoft shared\Web Server
    Extensions\15\LOGS"
    Could not determine size of directory "C:\Program Files\Common
    Files\microsoft shared\Web Server Extensions\15\LOGS"

    These other folders are working fine.
    C:\inetpub\logs
    C:\Windows\Temp
    C:\Windows\Logs\CBS
    C:\ProgramData\Microsoft\Windows\WER

    The only difference I see is spaces in the path.? I've put ""
    around it, but that doesn't seem to fix it.
    Does someone have a working example that includes spaces in the path?


Sorry, I don't have any examples to offer.

What does the directory's section in your client data message look like? And your entries in analysis.cfg and client-local.cfg?

You might be able to "match" the dirname with a regex, something like:

DIR "%^C:.Program.Files.Common.Files.microsoft.shared.Web.Server.Extensions.15.LOGS" SIZE<65000

J
list Japheth Cleaver · Thu, 5 Oct 2023 09:23:38 -0700 ·
Were you able to see the directory size output in the clientlog earlier?
It would look something like:

[dir:/var/log/foo bar/test1]
4840	/var/log/foo bar/test1

In theory, if that was in the clientlog, then double quotes around the DIR
line in analysis.cfg should be all that's necessary:

CLASS=linux
        DIR     "/var/log/foo bar/test1" red size<2000000 TRACK=FooBar

You can validate that the latter is being picked up by dumping the client
config:
xymoncmd xymond_client --dump-config
(snip)
DIR /var/log/foo bar/test1 red size<2000000 TRACK=FooBar CLASS=linux
(line: 360)
(snip)

Which Windows client were you using for the collection on your machine?

-jc
quoted from Kris Springer


On Thu, October 5, 2023 06:56, Kris Springer wrote:
Just to close the loop on this topic, I finally got this working by
creating a 'directory junction' symbolic link in a folder without spaces
that points to the folder path that has all the spaces in the name.??
Then I have the Xymon server test my symlink instead of the real path
because I could never get it to work any other way. Here's some examples.

In Windows host:
Use CMD to make 'junction' symlink to folder you want.
mklink /J C:\ProgramData\SPlogs ???C:\Program Files\Common Files\microsoft
shared\Web Server Extensions\15\LOGS???

In Xymon server:
In client-local.cfg file.
 ???? ??dir:C:\ProgramData\SPlogs\TaskUsage

In analysis.cfg file.
 ???? ??DIR???????? C:\ProgramData\SPlogs\TaskUsage red size<2000000
TRACK=TaskUsage

Kris Springer


On 9/8/23 20:51, Jeremy Laidman wrote:
On Sat, 9 Sept 2023 at 05:32, Kris Springer
<user-c2caa0a7a8d5@xymon.invalid> wrote:

    Anyone have a clue why the following folder size can't be
    determined when I add it to analysis.cfg and client-local.cfg ?

    "C:\Program Files\Common Files\microsoft shared\Web Server
    Extensions\15\LOGS"
    Could not determine size of directory "C:\Program Files\Common
    Files\microsoft shared\Web Server Extensions\15\LOGS"

    These other folders are working fine.
    C:\inetpub\logs
    C:\Windows\Temp
    C:\Windows\Logs\CBS
    C:\ProgramData\Microsoft\Windows\WER

    The only difference I see is spaces in the path.?? I've put ""
    around it, but that doesn't seem to fix it.
    Does someone have a working example that includes spaces in the
path?


Sorry, I don't have any examples to offer.

What does the directory's section in your client data message look
like? And your entries in analysis.cfg and client-local.cfg?

You might be able to "match" the dirname with a regex, something like:

DIR
"%^C:.Program.Files.Common.Files.microsoft.shared.Web.Server.Extensions.15.LOGS"
SIZE<65000

J
list Kris Springer · Thu, 5 Oct 2023 10:40:24 -0600 ·
I use XymonPSclient v2.42

I tried all sorts of variations of quotes, brackets, etc, with no 
success.? I even made significant efforts to create custom Environment 
Variables in Windows and test that instead, but that didn't work 
either.? I think it actually comes down to a Powershell command issue 
because PS is finicky and uses syntax that doesn't port well with 
linux.? And because I care more about function than form, I'm ok with my 
final solution, even though I understand I shouldn't have to go through 
these hoops just to test a folder's size.? But that's what I've come to 
expect with Windows.? It keeps me employed even though I despise it.

Kris Springer
quoted from Japheth Cleaver


On 10/5/23 10:23, J.C. Cleaver wrote:
Were you able to see the directory size output in the clientlog earlier?
It would look something like:

[dir:/var/log/foo bar/test1]
4840	/var/log/foo bar/test1

In theory, if that was in the clientlog, then double quotes around the DIR
line in analysis.cfg should be all that's necessary:

CLASS=linux
         DIR     "/var/log/foo bar/test1" red size<2000000 TRACK=FooBar

You can validate that the latter is being picked up by dumping the client
config:
xymoncmd xymond_client --dump-config
(snip)
DIR /var/log/foo bar/test1 red size<2000000 TRACK=FooBar CLASS=linux
(line: 360)
(snip)

Which Windows client were you using for the collection on your machine?

-jc


On Thu, October 5, 2023 06:56, Kris Springer wrote:
Just to close the loop on this topic, I finally got this working by
creating a 'directory junction' symbolic link in a folder without spaces
that points to the folder path that has all the spaces in the name.?
Then I have the Xymon server test my symlink instead of the real path
because I could never get it to work any other way. Here's some examples.

In Windows host:
Use CMD to make 'junction' symlink to folder you want.
mklink /J C:\ProgramData\SPlogs ???C:\Program Files\Common Files\microsoft
shared\Web Server Extensions\15\LOGS???

In Xymon server:
In client-local.cfg file.
  ???? ??dir:C:\ProgramData\SPlogs\TaskUsage

In analysis.cfg file.
  ???? ??DIR???????? C:\ProgramData\SPlogs\TaskUsage red size<2000000
TRACK=TaskUsage

Kris Springer


On 9/8/23 20:51, Jeremy Laidman wrote:
On Sat, 9 Sept 2023 at 05:32, Kris Springer
<user-c2caa0a7a8d5@xymon.invalid> wrote:

     Anyone have a clue why the following folder size can't be
     determined when I add it to analysis.cfg and client-local.cfg ?

     "C:\Program Files\Common Files\microsoft shared\Web Server
     Extensions\15\LOGS"
     Could not determine size of directory "C:\Program Files\Common
     Files\microsoft shared\Web Server Extensions\15\LOGS"

     These other folders are working fine.
     C:\inetpub\logs
     C:\Windows\Temp
     C:\Windows\Logs\CBS
     C:\ProgramData\Microsoft\Windows\WER

     The only difference I see is spaces in the path.?? I've put ""
     around it, but that doesn't seem to fix it.
     Does someone have a working example that includes spaces in the
path?


Sorry, I don't have any examples to offer.

What does the directory's section in your client data message look
like? And your entries in analysis.cfg and client-local.cfg?

You might be able to "match" the dirname with a regex, something like:

DIR
"%^C:.Program.Files.Common.Files.microsoft.shared.Web.Server.Extensions.15.LOGS"
SIZE<65000

J