• 0
Sign in to follow this  
Shannon Hansen

How to pull values from file content?

Question

  • 0

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

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

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

Share this post


Link to post
Share on other sites
  • 0

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this