I think we have a 260 chracter length restriction problem
We are polling a biztalk cluster and looking at the receive ports, all a sudden we got a "no data" from all of them, while i was looking at this , I did a test poll and was slightly surprised by the response. Despite this clearly being an error, it exits with "0" success, which is not so helpful.
<span class="pln">collecting-papp08-biz.xxxxxxxxxx.intra-MON_xxxxxxxxxx_Biztalk_SendPorts-RB.RIP.AndraBolag.Orchestrations.Departments_1.0.0.0_RB.RIP.AndraBolag.Orchestrations.Departments.HandleDepartmentsAB_SndRcv_HRPlus_GetDepartment_Port_e6dd5c64fddc35ff.stdout.ps1
RB.RIP.AndraBolag.Orchestrations.Departments_1.0.0.0_RB.RIP.AndraBolag.Orchestrations.Departments.HandleDepartmentsAB_SndRcv_HRPlus_GetDepartment_Port_e6dd5c64fddc35ff
errOutput
& : The term 'C:\Program Files (x86)\LogicMonitor\Agent\tmp\datacollecting-papp07-biz.xxxxxxxxx.intra-MON_xxxxxxxxxx_B
iztalk_SendPorts-RB.RIP.AndraBolag.Orchestrations.Departments_1.0.0.0_RB.RIP.AndraBolag.Orchestrations.Departments.Hand
leDepartmentsAB_SndRcv_HRPlus_GetDepartment_Port_e6dd5c64fddc35ff.stdout.ps1' is not recognized as the name of a cmdlet
, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that th
e path is correct and try again.
At line:1 char:3
+ & "C:\Program Files (x86)\LogicMonitor\Agent\tmp\datacollecting-papp0 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Program File...35ff.stdout.ps1:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException</span>
After a bit of fiddling about , I discovered that this was because the drive + name + extension + nul has a length greater than 260 characters. This is not currently permissible ( Microsoft are working on it ) The orchestration receive ports names are automatically generated so we cannot do much about those, Any workarounds? Should I create a case with LM?
mark_rowlands
Posted 4 years ago·Last reply 4 years ago
8 comments
LM User
·4 years ago
I'd focus on whether or not you need all that in the wildvalue/wildalias to uniquely identify the instance. Wildvalue/wildalias should only contain the minimum necessary to uniquely identify the instance. If you just want that information visible, consider moving it to the description of the instance instead (or instance level properties).
mark_rowlands
OP4 years ago
ok, what i did, it seems to work and it may or may not help someone else. I have no idea if it is right or wrong, I am still not convinced this script / alarm point is implemented in the smartest or most efficient way, but I am very new to LogicMonitor and it needs to work today ?( and yes, I will be getting me some proper LM training!)
The general process is this, a ps script runs on the Biztalkhost and generates a list of sendports. :-
Then we have an embedded PS active discovery script which looks like this ( the commented out sections I will come too later! )
So I am guessing it is that second parameter "$alias" that provides the name of the script that LM runs in the collector phase.
Thanks to everyone for pointers and tips. most helpful.
LM User
·4 years ago
Yes, i'd consider making shorter names/descriptions. But also remember, you can set some of those details as properties and even auto group instances based on a property value.
Pick one thing that is sufficient to uniquely identify the instance and use that as the wild value. Set the wildalias to something easily displayable in the UI and in alert notifications. Set longer text in the description.
So, you might do the following:
$drive##$name##$extension##customjob.nul=$nul
mark_rowlands
OP4 years ago
yes, it is a custom job that we wrote, LM support also suggested we try and truncate the names in some way.
Mike Moniz
·4 years ago
Hmm, I can't find that DataSource in LM or in the community exchange. Was that something you custom wrote or got from another website?
Based on the file name I'm guessing perhaps the ##wildvalue## or ##wildalias## the DataSource creates is too long, you may be able to modify the Auto Discover script to shorten it by only outputting the important part or even just capping the length to 200 or something like that. Might need to modify the main script also to account for that.
LM User
·4 years agoI'd focus on whether or not you need all that in the wildvalue/wildalias to uniquely identify the instance. Wildvalue/wildalias should only contain the minimum necessary to uniquely identify the instance. If you just want that information visible, consider moving it to the description of the instance instead (or instance level properties).
mark_rowlands
OP4 years agook, what i did, it seems to work and it may or may not help someone else. I have no idea if it is right or wrong, I am still not convinced this script / alarm point is implemented in the smartest or most efficient way, but I am very new to LogicMonitor and it needs to work today ? ( and yes, I will be getting me some proper LM training!)
The general process is this, a ps script runs on the Biztalkhost and generates a list of sendports. :-
Then we have an embedded PS active discovery script which looks like this ( the commented out sections I will come too later! )
this produces a nice long list of datapoints in LM ( fig1.png)
Then we run a collector script :-
and if we have a nice long name... the script fails.
So I slapped in a little regex to remove some duplicate data in the names :-
$regex= "RB\.RIP\.|Orchestrations\.|_e6dd5c64fddc35ff|_\d\.\d\.\d\.\d"
foreach ($sendport in $sendPorts){
$name = $sendport.Name
$alias = $sendport.Name
if (($sendport.Name.length) -gt 130 ) {
$alias = $sendport.Name -replace $regex
}
#write-host "$name##$name"
#This seems to be the incantation that works.
write-host "$name##$alias"
}
So I am guessing it is that second parameter "$alias" that provides the name of the script that LM runs in the collector phase.
Thanks to everyone for pointers and tips. most helpful.
LM User
·4 years agoYes, i'd consider making shorter names/descriptions. But also remember, you can set some of those details as properties and even auto group instances based on a property value.
Pick one thing that is sufficient to uniquely identify the instance and use that as the wild value. Set the wildalias to something easily displayable in the UI and in alert notifications. Set longer text in the description.
So, you might do the following:
$drive##$name##$extension##customjob.nul=$nul
mark_rowlands
OP4 years agoyes, it is a custom job that we wrote, LM support also suggested we try and truncate the names in some way.
Mike Moniz
·4 years agoHmm, I can't find that DataSource in LM or in the community exchange. Was that something you custom wrote or got from another website?
Based on the file name I'm guessing perhaps the ##wildvalue## or ##wildalias## the DataSource creates is too long, you may be able to modify the Auto Discover script to shorten it by only outputting the important part or even just capping the length to 200 or something like that. Might need to modify the main script also to account for that.
mark_rowlands
OP4 years agocomfirmed by LM support and no, they are not going to fix it anytime soon, suggestion was to truncate the names in the collector powershell script. I did suggest the LM developers might want to take a look at https://docs.microsoft.com/en-us/archive/blogs/jeremykuhne/net-4-6-2-and-long-paths-on-windows-10
mark_rowlands
OP4 years agoMonitor Biztalk SendPorts and alert in case status is Stopped or Unenlisted , a powershell script.
Mike Moniz
·4 years agoI would say open a ticket/chat with support and report it. What DataSource is that?