Forum Discussion

rlim's avatar
rlim
Icon for Neophyte rankNeophyte
9 months ago

Windows service datasource error

Hi everyone, very new to the community and the product so would love to get your feedback on this issue that I'm currently facing. I've got this custom datasource that is configured to capture critical windows services that are supposed to run but not running - I kinda edit from the original Windows Services datasource to fill our use case. The original works well but because of how much CPU/resources is pulling from, it's causing an issue for us. Thus why we are opting for a batchscript method rather than groovy so that it will less resource hungry.

The datasource is configured to run via embedded powershell and so far it has been working well but what I really cannot figure out is that there are a bunch of alerts for these services that flagged out but when I physically check the services in the VM, they are up and running. When I hit "Poll Now", I'm receiving these error. Can anyone who have the same issue, care to shed some light please.

 

    • Mike_Moniz's avatar
      Mike_Moniz
      Icon for Professor rankProfessor

      Good catch! Interesting that PollNow can still extract it.

  • Can you provide the bottom half of the poll now window? LM appears to be looking for the text "Nutanix Guest Agent.ExitCode=X" and not finding it. The Output and ##WILDVALUE## section of the Poll Now data would help determine that. A common cause is not putting ##WILDVALUE## in the datapoint when using BatchScript. For example you likely want to have "##WILDVALUE##.ExitCode" for the ExitCode datapoint... But that wouldn't explain if this is sometimes working and sometimes not. Also perhaps you are hitting the limit of text that LM will parse in the output?

    P.S. You can use groovy with BatchScript. BatchScript is really just how LM runs the process and how it interperates the output. But using PS here would likely be easier anyway.

  • Hi Mike, thanks for getting back to me. Please see screenshot below.

     

    • Mike_Moniz's avatar
      Mike_Moniz
      Icon for Professor rankProfessor

      Interesting, it looks like it pulled the output correctly. Can you provide the setting used for one of the Datapoints (other then ExitCode)? Are they set for "Content the script writes to the standard output", "multi-line key-value pairs" and "valid value range" boxes both empty?

  • Anonymous's avatar
    Anonymous

    Yes, it is odd that the poll now extracted it in the raw output, but it couldn't parse into datapoints because of the space.

  • Thank you both, Mike and Stuart for the input! I believe this has solved it. Much appreciated!