[Check_mk (english)] Monitor CIFS share

Does anyone have a way to monitor that a CIFS share is mounted on a linux server ?

Thank you.

Philip Parsons

IT and Telecommunication
Specialist

Techeez IT Consulting

250-818-2879

Skype ID: techeez
www.techeez.com “Making IT easy”

IMPORTANT NOTICE

This e-mail is confidential, may be legally privileged, and is for the intended recipient only. Access, disclosure, copying and distribution or reliance on any
of it by anyone else is prohibited and may be a criminal offence. Please delete if obtained in error and e-mail confirmation to the sender.

I should have added using wato to do this ? I cannot seem to find the option

···

From: checkmk-en-bounces@lists.mathias-kettner.de [mailto:checkmk-en-bounces@lists.mathias-kettner.de]
On Behalf Of Philip Parsons
Sent: December-10-13 11:33 AM
To: checkmk-en@lists.mathias-kettner.de
Subject: [Check_mk (english)] Monitor CIFS share

Does anyone have a way to monitor that a CIFS share is mounted on a linux server ?

Thank you.

Philip Parsons

IT and Telecommunication
Specialist

Techeez IT Consulting

250-818-2879

Skype ID: techeez
www.techeez.com “Making IT easy”

IMPORTANT NOTICE

This e-mail is confidential, may be legally privileged, and is for the intended recipient only. Access, disclosure, copying and distribution or reliance on any
of it by anyone else is prohibited and may be a criminal offence. Please delete if obtained in error and e-mail confirmation to the sender.


This message has been scanned for viruses and
dangerous content by MailScanner, and is

believed to be clean.

Hi Philip,

cifs is excluded from df check in linux agent. You could search/grep
for "excludefs" and change the line not to exclude cifs. This way you
would get all cifs mounts automatically inventorized (for all hosts
running this customized agent).
Or you take the df part of the agent and create your own local check
or plugin to provide cifs shares. All hosts providing cifs shares must
have this plugin/local check.

Personally I'd prefer the plugin way - just take the whole df-part of
the agent, customize it to output ONLY cifs and put this plugin to all
appropriate hosts in the plugins folder of the agent. Doesn't matter
if the df section is provided more than once - cmk will use "all"
sections.

HTH,
Marcel

···

2013/12/10 Philip Parsons <pparsons@techeez.com>:

I should have added using wato to do this ? I cannot seem to find the
option

From: checkmk-en-bounces@lists.mathias-kettner.de
[mailto:checkmk-en-bounces@lists.mathias-kettner.de] On Behalf Of Philip
Parsons
Sent: December-10-13 11:33 AM
To: checkmk-en@lists.mathias-kettner.de
Subject: [Check_mk (english)] Monitor CIFS share

Does anyone have a way to monitor that a CIFS share is mounted on a linux
server ?

Thank you.
Philip Parsons
IT and Telecommunication Specialist

Techeez IT Consulting

250-818-2879

Skype ID: techeez
www.techeez.com "Making IT easy"

IMPORTANT NOTICE
This e-mail is confidential, may be legally privileged, and is for the
intended recipient only. Access, disclosure, copying and distribution or
reliance on any of it by anyone else is prohibited and may be a criminal
offence. Please delete if obtained in error and e-mail confirmation to the
sender.

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en

Just as an extra warning: a while ago we had to write a script that wrote a file and deleted it from the share to be sure the share was really active.

Greetings -job

···

On Tue, Dec 10, 2013 at 9:11 PM, Marcel Schulte schulte.marcel@gmail.com wrote:

Hi Philip,

cifs is excluded from df check in linux agent. You could search/grep

for “excludefs” and change the line not to exclude cifs. This way you

would get all cifs mounts automatically inventorized (for all hosts

running this customized agent).

Or you take the df part of the agent and create your own local check

or plugin to provide cifs shares. All hosts providing cifs shares must

have this plugin/local check.

Personally I’d prefer the plugin way - just take the whole df-part of

the agent, customize it to output ONLY cifs and put this plugin to all

appropriate hosts in the plugins folder of the agent. Doesn’t matter

if the df section is provided more than once - cmk will use “all”

sections.

HTH,

Marcel

2013/12/10 Philip Parsons pparsons@techeez.com:

I should have added using wato to do this ? I cannot seem to find the

option

From: checkmk-en-bounces@lists.mathias-kettner.de

[mailto:checkmk-en-bounces@lists.mathias-kettner.de] On Behalf Of Philip

Parsons

Sent: December-10-13 11:33 AM

To: checkmk-en@lists.mathias-kettner.de

Subject: [Check_mk (english)] Monitor CIFS share

Does anyone have a way to monitor that a CIFS share is mounted on a linux

server ?

Thank you.

Philip Parsons

IT and Telecommunication Specialist

Techeez IT Consulting

250-818-2879

Skype ID: techeez

www.techeez.com “Making IT easy”

IMPORTANT NOTICE

This e-mail is confidential, may be legally privileged, and is for the

intended recipient only. Access, disclosure, copying and distribution or

reliance on any of it by anyone else is prohibited and may be a criminal

offence. Please delete if obtained in error and e-mail confirmation to the

sender.

This message has been scanned for viruses and

dangerous content by MailScanner, and is

believed to be clean.


checkmk-en mailing list

checkmk-en@lists.mathias-kettner.de

http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en


checkmk-en mailing list

checkmk-en@lists.mathias-kettner.de

http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en

Thanks for the info and so before I created the plugin I tried altering the command and it does not show up the mount points..

I changed

df -PTlk $excludefs | sed 1d

to
df -PTk | sed 1d

and if you run it manually it shows up but when you run a full scan in wato it does not show up at all.. ? Any Idea's

···

-----Original Message-----
From: Marcel Schulte [mailto:schulte.marcel@gmail.com]
Sent: December-10-13 12:11 PM
To: Philip Parsons
Cc: checkmk-en@lists.mathias-kettner.de
Subject: Re: [Check_mk (english)] Monitor CIFS share

Hi Philip,

cifs is excluded from df check in linux agent. You could search/grep
for "excludefs" and change the line not to exclude cifs. This way you
would get all cifs mounts automatically inventorized (for all hosts
running this customized agent).
Or you take the df part of the agent and create your own local check
or plugin to provide cifs shares. All hosts providing cifs shares must
have this plugin/local check.

Personally I'd prefer the plugin way - just take the whole df-part of
the agent, customize it to output ONLY cifs and put this plugin to all
appropriate hosts in the plugins folder of the agent. Doesn't matter
if the df section is provided more than once - cmk will use "all"
sections.

HTH,
Marcel

2013/12/10 Philip Parsons <pparsons@techeez.com>:

I should have added using wato to do this ? I cannot seem to find the
option

From: checkmk-en-bounces@lists.mathias-kettner.de
[mailto:checkmk-en-bounces@lists.mathias-kettner.de] On Behalf Of Philip
Parsons
Sent: December-10-13 11:33 AM
To: checkmk-en@lists.mathias-kettner.de
Subject: [Check_mk (english)] Monitor CIFS share

Does anyone have a way to monitor that a CIFS share is mounted on a linux
server ?

Thank you.
Philip Parsons
IT and Telecommunication Specialist

Techeez IT Consulting

250-818-2879

Skype ID: techeez
www.techeez.com "Making IT easy"

IMPORTANT NOTICE
This e-mail is confidential, may be legally privileged, and is for the
intended recipient only. Access, disclosure, copying and distribution or
reliance on any of it by anyone else is prohibited and may be a criminal
offence. Please delete if obtained in error and e-mail confirmation to the
sender.

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Hi Philip,

where did you change this?

Do the mountpoint show up in "cmk -d HOSTNAME"? Could you provide such
an output (as PM, list is limited to 80kb)?

Thanks,
Marcel

···

2013/12/10 Philip Parsons <pparsons@techeez.com>:

Thanks for the info and so before I created the plugin I tried altering the command and it does not show up the mount points..

I changed

df -PTlk $excludefs | sed 1d

to
df -PTk | sed 1d

and if you run it manually it shows up but when you run a full scan in wato it does not show up at all.. ? Any Idea's

-----Original Message-----
From: Marcel Schulte [mailto:schulte.marcel@gmail.com]
Sent: December-10-13 12:11 PM
To: Philip Parsons
Cc: checkmk-en@lists.mathias-kettner.de
Subject: Re: [Check_mk (english)] Monitor CIFS share

Hi Philip,

cifs is excluded from df check in linux agent. You could search/grep
for "excludefs" and change the line not to exclude cifs. This way you
would get all cifs mounts automatically inventorized (for all hosts
running this customized agent).
Or you take the df part of the agent and create your own local check
or plugin to provide cifs shares. All hosts providing cifs shares must
have this plugin/local check.

Personally I'd prefer the plugin way - just take the whole df-part of
the agent, customize it to output ONLY cifs and put this plugin to all
appropriate hosts in the plugins folder of the agent. Doesn't matter
if the df section is provided more than once - cmk will use "all"
sections.

HTH,
Marcel

2013/12/10 Philip Parsons <pparsons@techeez.com>:

I should have added using wato to do this ? I cannot seem to find the
option

From: checkmk-en-bounces@lists.mathias-kettner.de
[mailto:checkmk-en-bounces@lists.mathias-kettner.de] On Behalf Of Philip
Parsons
Sent: December-10-13 11:33 AM
To: checkmk-en@lists.mathias-kettner.de
Subject: [Check_mk (english)] Monitor CIFS share

Does anyone have a way to monitor that a CIFS share is mounted on a linux
server ?

Thank you.
Philip Parsons
IT and Telecommunication Specialist

Techeez IT Consulting

250-818-2879

Skype ID: techeez
www.techeez.com "Making IT easy"

IMPORTANT NOTICE
This e-mail is confidential, may be legally privileged, and is for the
intended recipient only. Access, disclosure, copying and distribution or
reliance on any of it by anyone else is prohibited and may be a criminal
offence. Please delete if obtained in error and e-mail confirmation to the
sender.

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

I change this in the client section for DF on the client and when I do the cmk -d host name the mount show up the bottom 3 are the ones I want. But when I look at the services in wato for the client the bottom 3 do not show up ??

<<<df>>>
/dev/mapper/VolGroup00-LogVol00 ext3 8256952 2934160 4903416 38% /
/dev/sda3 ext3 194449 68237 116172 38% /boot
none tmpfs 1037356 0 1037356 0% /dev/shm
/dev/mapper/VolGroup00-LogVol03 ext3 4128448 103132 3815604 3% /tmp
/dev/mapper/VolGroup00-LogVol04 ext3 4128448 1623168 2295568 42% /var
/dev/mapper/VolGroup00-LogVol02 ext3 36220536 19940680 14440284 58% /usr
/dev/mapper/VolGroup00-LogVol05 ext3 14351408 7025376 6597076 52% /home
//io/workspace smbfs 235925504 159019008 76906496 68% /mnt/workspace
//io/common smbfs 235925504 159019008 76906496 68% /mnt/jupiter
//io/shipping smbfs 235925504 159019008 76906496 68% /mnt/shipping

···

-----Original Message-----
From: Marcel Schulte [mailto:schulte.marcel@gmail.com]
Sent: December-10-13 7:36 PM
To: Philip Parsons
Cc: checkmk-en@lists.mathias-kettner.de
Subject: Re: [Check_mk (english)] Monitor CIFS share

Hi Philip,

where did you change this?

Do the mountpoint show up in "cmk -d HOSTNAME"? Could you provide such
an output (as PM, list is limited to 80kb)?

Thanks,
Marcel

2013/12/10 Philip Parsons <pparsons@techeez.com>:

Thanks for the info and so before I created the plugin I tried altering the command and it does not show up the mount points..

I changed

df -PTlk $excludefs | sed 1d

to
df -PTk | sed 1d

and if you run it manually it shows up but when you run a full scan in wato it does not show up at all.. ? Any Idea's

-----Original Message-----
From: Marcel Schulte [mailto:schulte.marcel@gmail.com]
Sent: December-10-13 12:11 PM
To: Philip Parsons
Cc: checkmk-en@lists.mathias-kettner.de
Subject: Re: [Check_mk (english)] Monitor CIFS share

Hi Philip,

cifs is excluded from df check in linux agent. You could search/grep
for "excludefs" and change the line not to exclude cifs. This way you
would get all cifs mounts automatically inventorized (for all hosts
running this customized agent).
Or you take the df part of the agent and create your own local check
or plugin to provide cifs shares. All hosts providing cifs shares must
have this plugin/local check.

Personally I'd prefer the plugin way - just take the whole df-part of
the agent, customize it to output ONLY cifs and put this plugin to all
appropriate hosts in the plugins folder of the agent. Doesn't matter
if the df section is provided more than once - cmk will use "all"
sections.

HTH,
Marcel

2013/12/10 Philip Parsons <pparsons@techeez.com>:

I should have added using wato to do this ? I cannot seem to find the
option

From: checkmk-en-bounces@lists.mathias-kettner.de
[mailto:checkmk-en-bounces@lists.mathias-kettner.de] On Behalf Of Philip
Parsons
Sent: December-10-13 11:33 AM
To: checkmk-en@lists.mathias-kettner.de
Subject: [Check_mk (english)] Monitor CIFS share

Does anyone have a way to monitor that a CIFS share is mounted on a linux
server ?

Thank you.
Philip Parsons
IT and Telecommunication Specialist

Techeez IT Consulting

250-818-2879

Skype ID: techeez
www.techeez.com "Making IT easy"

IMPORTANT NOTICE
This e-mail is confidential, may be legally privileged, and is for the
intended recipient only. Access, disclosure, copying and distribution or
reliance on any of it by anyone else is prohibited and may be a criminal
offence. Please delete if obtained in error and e-mail confirmation to the
sender.

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Hi Philip,

the fs type seems to be excluded in ~/share/check_mk/checks/df.include, too:

inventory_df_exclude_fs = [ 'nfs', 'smbfs', 'cifs', 'iso9660' ]

...change that line and it should work - just tested this myself.

Regards,
Marcel

···

2013/12/11 Philip Parsons <pparsons@techeez.com>:

I change this in the client section for DF on the client and when I do the cmk -d host name the mount show up the bottom 3 are the ones I want. But when I look at the services in wato for the client the bottom 3 do not show up ??

<<<df>>>
/dev/mapper/VolGroup00-LogVol00 ext3 8256952 2934160 4903416 38% /
/dev/sda3 ext3 194449 68237 116172 38% /boot
none tmpfs 1037356 0 1037356 0% /dev/shm
/dev/mapper/VolGroup00-LogVol03 ext3 4128448 103132 3815604 3% /tmp
/dev/mapper/VolGroup00-LogVol04 ext3 4128448 1623168 2295568 42% /var
/dev/mapper/VolGroup00-LogVol02 ext3 36220536 19940680 14440284 58% /usr
/dev/mapper/VolGroup00-LogVol05 ext3 14351408 7025376 6597076 52% /home
//io/workspace smbfs 235925504 159019008 76906496 68% /mnt/workspace
//io/common smbfs 235925504 159019008 76906496 68% /mnt/jupiter
//io/shipping smbfs 235925504 159019008 76906496 68% /mnt/shipping

-----Original Message-----
From: Marcel Schulte [mailto:schulte.marcel@gmail.com]
Sent: December-10-13 7:36 PM
To: Philip Parsons
Cc: checkmk-en@lists.mathias-kettner.de
Subject: Re: [Check_mk (english)] Monitor CIFS share

Hi Philip,

where did you change this?

Do the mountpoint show up in "cmk -d HOSTNAME"? Could you provide such
an output (as PM, list is limited to 80kb)?

Thanks,
Marcel

2013/12/10 Philip Parsons <pparsons@techeez.com>:

Thanks for the info and so before I created the plugin I tried altering the command and it does not show up the mount points..

I changed

df -PTlk $excludefs | sed 1d

to
df -PTk | sed 1d

and if you run it manually it shows up but when you run a full scan in wato it does not show up at all.. ? Any Idea's

-----Original Message-----
From: Marcel Schulte [mailto:schulte.marcel@gmail.com]
Sent: December-10-13 12:11 PM
To: Philip Parsons
Cc: checkmk-en@lists.mathias-kettner.de
Subject: Re: [Check_mk (english)] Monitor CIFS share

Hi Philip,

cifs is excluded from df check in linux agent. You could search/grep
for "excludefs" and change the line not to exclude cifs. This way you
would get all cifs mounts automatically inventorized (for all hosts
running this customized agent).
Or you take the df part of the agent and create your own local check
or plugin to provide cifs shares. All hosts providing cifs shares must
have this plugin/local check.

Personally I'd prefer the plugin way - just take the whole df-part of
the agent, customize it to output ONLY cifs and put this plugin to all
appropriate hosts in the plugins folder of the agent. Doesn't matter
if the df section is provided more than once - cmk will use "all"
sections.

HTH,
Marcel

2013/12/10 Philip Parsons <pparsons@techeez.com>:

I should have added using wato to do this ? I cannot seem to find the
option

From: checkmk-en-bounces@lists.mathias-kettner.de
[mailto:checkmk-en-bounces@lists.mathias-kettner.de] On Behalf Of Philip
Parsons
Sent: December-10-13 11:33 AM
To: checkmk-en@lists.mathias-kettner.de
Subject: [Check_mk (english)] Monitor CIFS share

Does anyone have a way to monitor that a CIFS share is mounted on a linux
server ?

Thank you.
Philip Parsons
IT and Telecommunication Specialist

Techeez IT Consulting

250-818-2879

Skype ID: techeez
www.techeez.com "Making IT easy"

IMPORTANT NOTICE
This e-mail is confidential, may be legally privileged, and is for the
intended recipient only. Access, disclosure, copying and distribution or
reliance on any of it by anyone else is prohibited and may be a criminal
offence. Please delete if obtained in error and e-mail confirmation to the
sender.

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Ok great thanks will try it.

Thank you
P Parsons

···

On Dec 11, 2013, at 9:45 PM, "Marcel Schulte" <schulte.marcel@gmail.com> wrote:

Hi Philip,

the fs type seems to be excluded in ~/share/check_mk/checks/df.include, too:

inventory_df_exclude_fs = [ 'nfs', 'smbfs', 'cifs', 'iso9660' ]

...change that line and it should work - just tested this myself.

Regards,
Marcel

2013/12/11 Philip Parsons <pparsons@techeez.com>:

I change this in the client section for DF on the client and when I do the cmk -d host name the mount show up the bottom 3 are the ones I want. But when I look at the services in wato for the client the bottom 3 do not show up ??

<<<df>>>
/dev/mapper/VolGroup00-LogVol00 ext3 8256952 2934160 4903416 38% /
/dev/sda3 ext3 194449 68237 116172 38% /boot
none tmpfs 1037356 0 1037356 0% /dev/shm
/dev/mapper/VolGroup00-LogVol03 ext3 4128448 103132 3815604 3% /tmp
/dev/mapper/VolGroup00-LogVol04 ext3 4128448 1623168 2295568 42% /var
/dev/mapper/VolGroup00-LogVol02 ext3 36220536 19940680 14440284 58% /usr
/dev/mapper/VolGroup00-LogVol05 ext3 14351408 7025376 6597076 52% /home
//io/workspace smbfs 235925504 159019008 76906496 68% /mnt/workspace
//io/common smbfs 235925504 159019008 76906496 68% /mnt/jupiter
//io/shipping smbfs 235925504 159019008 76906496 68% /mnt/shipping

-----Original Message-----
From: Marcel Schulte [mailto:schulte.marcel@gmail.com]
Sent: December-10-13 7:36 PM
To: Philip Parsons
Cc: checkmk-en@lists.mathias-kettner.de
Subject: Re: [Check_mk (english)] Monitor CIFS share

Hi Philip,

where did you change this?

Do the mountpoint show up in "cmk -d HOSTNAME"? Could you provide such
an output (as PM, list is limited to 80kb)?

Thanks,
Marcel

2013/12/10 Philip Parsons <pparsons@techeez.com>:

Thanks for the info and so before I created the plugin I tried altering the command and it does not show up the mount points..

I changed

df -PTlk $excludefs | sed 1d

to
df -PTk | sed 1d

and if you run it manually it shows up but when you run a full scan in wato it does not show up at all.. ? Any Idea's

-----Original Message-----
From: Marcel Schulte [mailto:schulte.marcel@gmail.com]
Sent: December-10-13 12:11 PM
To: Philip Parsons
Cc: checkmk-en@lists.mathias-kettner.de
Subject: Re: [Check_mk (english)] Monitor CIFS share

Hi Philip,

cifs is excluded from df check in linux agent. You could search/grep
for "excludefs" and change the line not to exclude cifs. This way you
would get all cifs mounts automatically inventorized (for all hosts
running this customized agent).
Or you take the df part of the agent and create your own local check
or plugin to provide cifs shares. All hosts providing cifs shares must
have this plugin/local check.

Personally I'd prefer the plugin way - just take the whole df-part of
the agent, customize it to output ONLY cifs and put this plugin to all
appropriate hosts in the plugins folder of the agent. Doesn't matter
if the df section is provided more than once - cmk will use "all"
sections.

HTH,
Marcel

2013/12/10 Philip Parsons <pparsons@techeez.com>:

I should have added using wato to do this ? I cannot seem to find the
option

From: checkmk-en-bounces@lists.mathias-kettner.de
[mailto:checkmk-en-bounces@lists.mathias-kettner.de] On Behalf Of Philip
Parsons
Sent: December-10-13 11:33 AM
To: checkmk-en@lists.mathias-kettner.de
Subject: [Check_mk (english)] Monitor CIFS share

Does anyone have a way to monitor that a CIFS share is mounted on a linux
server ?

Thank you.
Philip Parsons
IT and Telecommunication Specialist

Techeez IT Consulting

250-818-2879

Skype ID: techeez
www.techeez.com "Making IT easy"

IMPORTANT NOTICE
This e-mail is confidential, may be legally privileged, and is for the
intended recipient only. Access, disclosure, copying and distribution or
reliance on any of it by anyone else is prohibited and may be a criminal
offence. Please delete if obtained in error and e-mail confirmation to the
sender.

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.