Forum Discussion

Shannon_Hansen's avatar
13 years ago

How to pull values from file content?

Jeff,n

nThanks for the additional ideas. Ill have to dig into WMI and figure that out. That sounds like a much better way!n

nThanks again!!

  • Hello. I\'m new to LogicMonitor so if this has an easy solution please excuse the noob question.

    Through another process I\'ve been able to dump a numeric value into a text file that represents the size of a specific file. What I\'d like to be able to do is have my LogicMonitor agent read the contents of that file and then graph that value out. The only thing within the file is just a number, no other text. I\'ve tried a couple different script collectors and I can see it reporting back a True value, but not capturing the actual value within the file.

    I\'ve create a batch file that simply echos the file contents to the screen. I\'ve tried to use a script collector to gather that value using output as my Raw Metric (content the script writes to standard out) and have it set to use the output directly, no interpretation.

    Any other ideas of how better (or at all) to accomplish this?

    Thanks in advance!!

    Shannon

  • Nevermind, got it figured out. I forgot to keep in mind which server the LogicMonitor agent was installed on and which host I was trying to run the script on and capture the data from. I was applying the datasource to the server I wanted to collect the data from, but the agent was installed on a different server. Once I ran the script on the correct server it gathered the values just as I wanted.n

    nSometimes its the little things!n

    nThanks.