What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

How to use File Content Sensor with Linux?

Votes:

0

I am trying to get a sensor configured to read the last string of a particular logfile on out linux server running Ubuntu 14.0.1. I have verified that the credentials and exact path to the file are correct, and I am receiving this error:

Cannot access file: The network name cannot be found(67) (code: PE031)

All the documentation as to how this file works points me towards the idea that it may be designed for Windows, but I cannot verify. Will this sensor work for a linux log file? The user that is connecting via ssh specified in the inherited credentials of the device is an administrator, so there should be no permissions issues.

Confused as to how I troubleshoot this further. Do I have to specify which linux resource reads the file, such as nano or vim?

error file-content-sensor linux logs prtg

Created on Dec 15, 2014 11:56:46 PM



10 Replies

Votes:

0

This should work if the server has samba installed. If you enter the SMB share and the proper credentials, the file should be found. Can you check that? :)

Created on Dec 16, 2014 8:04:20 AM by  Stephan Linke [Paessler Support]



Votes:

0

Thanks for your prompt reply. I have configured samba on the linux server and set up a share to the logs directory and updated the samba password for the user specified to connect in PRTG. I am now getting a "username or password is incorrect" error, but when I test the ssh logon process with the password I have provided, it works without a hitch. The syntax I am using in the "filename" area of the sensor setup is:

/home/niolab/projects/lab/dev_opto/logs

Is that correct or do I need to specify that the client will be using samba to share, e.g., amending the beginning of the filepath with "smb:" ?

There's a distinct possibility that my smb.conf file is not set up correctly, but when I run "testparam" it reports no issues with samba.

Any advice?

Created on Dec 16, 2014 5:49:29 PM



Votes:

0

UPDATE: I have been able to get rid of the initial error, and have now encountered a brand new and interesting error:

Logon failure: The specified server cannot perform the requested operation(58) (code: PE029)

Any ideas what might be causing this?

Thanks!

Created on Dec 16, 2014 7:59:53 PM



Votes:

0

Can you log into that share within Windows Explorer?

Created on Dec 17, 2014 1:14:04 PM by  Stephan Linke [Paessler Support]



Votes:

0

Yes indeed I can. And now we are back to the error of the username and password being incorrect. However I can connect to that share with the username and password specified...

Created on Dec 17, 2014 7:34:39 PM



Votes:

0

Are you using a domain name or computer name to login in the explorer (or PRTG)? Could you try localhost as domain?

Created on Dec 18, 2014 9:39:11 AM by  Stephan Linke [Paessler Support]

Last change on Dec 18, 2014 9:39:29 AM by  Stephan Linke [Paessler Support]



Votes:

0

I can connect in windows explorer either via the DNS name or the IP itself. When you mention using localhost as the domain, which part of the setup are you referring to? I can't find a place to add a domain; I can add a workgroup in the smb.conf file on the linux server, and the file content sensor inherits all of it's settings from the parent device. In that parent device, I cannot locate a place to input localhost as my domain, so I am slightly confused as to what you mean by that. Would you mind clarifying further?

Created on Dec 18, 2014 4:42:29 PM



Votes:

0

Sure :) You can modify that setting by going to the settings tab of the device. Untick "Credentials for Windows Systems" and you can enter the domain or hostname there :) Workgroup should work for that. Also try localhost as said before :)

Created on Dec 19, 2014 10:14:38 AM by  Stephan Linke [Paessler Support]



Votes:

0

I was hopeful that would work. But I am still seeing the username and password error even though I have verified this multiple times. Is PRTG looking for the password specified in smbpasswd for the user or the linux password for the user itself?

Also: I was considering monitoring the service on the linux server via a customer script that returns a value, but when I add the SSH script sensor in PRTG, I recieve the error: "cannot access /var/prtg/scripts/: No such file or directory"

Is there a place in PRTG that I specify the directory for those scripts specifically? All of the other scripts load without issue. Sign of a potential corrupt install?

In the future, I'd strongly advocate for development of more specific sensors for linux, monitoring individual processes/applications seems to be a fairly widespread need amongst IT professionals, and your software is really top notch...aside from it's linux capabilites. :)

Created on Dec 19, 2014 6:17:05 PM



Votes:

0

Since the sensor is accessing the SMB Share, it should only require that the smbpasswd password that would allow access be needed. Which path are you using in the sensor settings? Would it be possible to post a screenshot of the settings here or send us a ticket to [email protected] with some screenshots and info about your set up?

Created on Dec 23, 2014 2:19:01 PM by  Greg Campion [Paessler Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.