Hey Patrick,
I decided to tackle the update to Sydi-Overview myself. You know, my request to include networking information in the overview. I still suck at scripting, at least from scratch, but i can modify existing scripts with the best of them. I am running into problems with it though, and i am hoping you or someone else can shed some light on my problems.
I have made adjustments in a couple of spots. First off, here is the area of the XML file that i am trying to get the data from:
In the sydi-overview script i made the following changes:
under Set objDbrComputers = CreateObject("ADOR.Recordset")
i added the line
objDbrComputers.Fields.Append "Address", adVarChar, MaxCharacters (To add an item to the array called Address, i think)
Then, within the Sub ParseXMLfile(strXMLFile) function, i added the following
If (objChild.nodeName = "ip") Then
objDbrComputers("address") = Scrub(objChild.getAttribute("address"))
End If
Within Sub PopulateExcelfile(), i added the following
objExcel.Cells(1, 14).Value = "Address"
and changed objExcel.Range to reflect the additional field (objExcel.Range("A1:N1").Select)
Then, in the next Do Until, i added objExcel.Cells(intLine, 14).Value = objDbrComputers("Address") right before the
objDbrComputers.MoveNext
That is the changes i have made. When i generate the file, it creates the heading for Address, but nothing ends up in that field.
Could you shed some light on this. Do i have the wrong objChild.nodeName or something.
any assistance would be greatly appreciated.
I am just looking for the first address listed, because you mentioned that systems could have multiple addresses.
Thanks in advance for the help
app
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It might be that you're looking for information one layer too high up in the xml file.
I have this on my list for SYDI-Server 2.1, though I don't know if I will manage to get everything that I want included in 2.1. Part of me just wants to get it out. :)
The reason I didn't add it yet has been that a machine might have several ip addresses and I don't have a good solution for that. I'm thinking about just adding a comma separated list.
If you send me an email I should be able to send you a patch where you have the ip addresses in the Excel file.
Cheers
Patrick
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey Patrick,
I decided to tackle the update to Sydi-Overview myself. You know, my request to include networking information in the overview. I still suck at scripting, at least from scratch, but i can modify existing scripts with the best of them. I am running into problems with it though, and i am hoping you or someone else can shed some light on my problems.
I have made adjustments in a couple of spots. First off, here is the area of the XML file that i am trying to get the data from:
<network>
<adapter description="HP Network Team #1" macaddress="00:13:21:1B:9B:72">
<ip address="10.100.50.57" subnetmask="255.255.255.0" />
<gateway address="10.100.50.1" />
<dnsserver address="10.100.50.57" />
<dnsserver address="10.100.50.58" />
<dnsdomain name="" />
<primarywins address="10.100.50.57" />
</adapter>
<ip4routes>
<route destination="0.0.0.0" mask="0.0.0.0" nexthop="10.100.50.1" />
<route destination="10.100.50.0" mask="10.100.50.0" nexthop="10.100.50.57" />
<route destination="10.100.50.57" mask="10.100.50.57" nexthop="127.0.0.1" />
<route destination="10.255.255.255" mask="10.255.255.255" nexthop="10.100.50.57" />
<route destination="127.0.0.0" mask="127.0.0.0" nexthop="127.0.0.1" />
<route destination="224.0.0.0" mask="224.0.0.0" nexthop="10.100.50.57" />
<route destination="255.255.255.255" mask="255.255.255.255" nexthop="10.100.50.57" />
</ip4routes>
</network>
In the sydi-overview script i made the following changes:
under Set objDbrComputers = CreateObject("ADOR.Recordset")
i added the line
objDbrComputers.Fields.Append "Address", adVarChar, MaxCharacters (To add an item to the array called Address, i think)
Then, within the Sub ParseXMLfile(strXMLFile) function, i added the following
If (objChild.nodeName = "ip") Then
objDbrComputers("address") = Scrub(objChild.getAttribute("address"))
End If
Within Sub PopulateExcelfile(), i added the following
objExcel.Cells(1, 14).Value = "Address"
and changed objExcel.Range to reflect the additional field (objExcel.Range("A1:N1").Select)
Then, in the next Do Until, i added objExcel.Cells(intLine, 14).Value = objDbrComputers("Address") right before the
objDbrComputers.MoveNext
That is the changes i have made. When i generate the file, it creates the heading for Address, but nothing ends up in that field.
Could you shed some light on this. Do i have the wrong objChild.nodeName or something.
any assistance would be greatly appreciated.
I am just looking for the first address listed, because you mentioned that systems could have multiple addresses.
Thanks in advance for the help
app
It might be that you're looking for information one layer too high up in the xml file.
I have this on my list for SYDI-Server 2.1, though I don't know if I will manage to get everything that I want included in 2.1. Part of me just wants to get it out. :)
The reason I didn't add it yet has been that a machine might have several ip addresses and I don't have a good solution for that. I'm thinking about just adding a comma separated list.
If you send me an email I should be able to send you a patch where you have the ip addresses in the Excel file.
Cheers
Patrick