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

Import sensor values from csv

Votes:

0

I have a CSV log file in each minute with data for 5 chanel like this: "Sensor_Name";"ValueCH1";"ValueCH2";"ValueCH3";"ValueCH4";"ValueCH5"; The file name can be the same in each minute or the date/time of the event. The name is a string but values are decimal. Can I create a sensor which read this file and import the values? Or can I import more lines if I add the "Date_and_Time" value for each line? I mean generate the log file for a day with an application then import a whole day data into PRTG once a day. In the other way there is also good if PRTG can read (import) sensor data from SQL database.

csv import logfilereader textfile

Created on Jun 1, 2012 6:43:41 AM



4 Replies

Votes:

0

Hello,

PRTG cannot import sensor data. It is only able to read values now and then the next values with the next scan. After that, it cannot go back and push values from this morning or something similar into the PRTG monitoring database. So you need to write a Custom Exe Advanced Sensor which reads this CSV file once a minute and then returns the values to PRTG.

Created on Jun 1, 2012 2:29:49 PM by  Torsten Lindner [Paessler Support]



Votes:

0

Hi, I'm working in it! I understand that PRTG can't import data for the past because storing a calculated average value not the exact numbers, but anyway it would be good to import multiple channel data in one line by Custom Exe sensor instead of only one value! Now I have to convert the csv into XML format first and import with your Exe Advanced Sensor. All the line in the XML are the same except the data values, and need extra CPU/disk time! I think as usually the simple way (csv) is the better way. When I create the sensor I could set all the necessary parameters and your program should use ";" as a separator instead of "<complicated and unecessary long text> and again </complicated and unecessary long text>" :)

Created on Jun 1, 2012 2:47:18 PM



Votes:

0

First of all, PRTG does not save averages. It saves RAW values from each scan, but the it's only able to add a new value at the "end" of todays data file, which on the other hand makes it so much faster than any SQL-based storage solution. Secondly, it does not matter if your sensor is reading a CSV or XML file, only the results need to be returned to PRTG in valid XML-Structure by the sensor.

Created on Jun 1, 2012 3:11:57 PM by  Torsten Lindner [Paessler Support]



Votes:

0

Dear Torsten, Sorry for my mistake about your software. Forget the fill data into the past. Anyway I just wanted to say if PRTG API culd read CSV instead of XML (during real time sensor scan) then each read could be faster because no need to read CSV then convert to XML then pass the result to PRTG. I know it just a milliseconds but for more sensor it's more milliseconds... The ather angle all of my application can export CSV log but neither can do XML. Anyway we can close this topic I understood I have to convert CSV to XML and if this is the only way then I walk on this! :)

Created on Jun 4, 2012 6:57:50 AM




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.