Forum Discussion

Jay_Nielson_410's avatar
Icon for Nimbostratus rankNimbostratus
Mar 16, 2012

.Net Monitoring throughput Suggestions needed

I think I have the pertenant code below and the error message it generates is on .get_performance_graph_csv_statistics(Query). I have tried various valid performance graph name "memory", "CPU" and "throughput" and a few other permutations of code but I always get hung up with this error. I was starting by trying to pull raw data from the LBs to be stored on a web server. Any suggestions?




iControl.Interfaces interfaces = new iControl.Interfaces(); if (interfaces.initialize(selfip.ToString(), 443, "xxxxx", "xxxxxxx")) { iControl.SystemStatisticsPerformanceGraph[] graphInfo = interfaces.SystemStatistics.get_performance_graph_list(); for (int i = 0; i "); } iControl.SystemStatisticsPerformanceStatisticQuery[] Query = new iControl.SystemStatisticsPerformanceStatisticQuery[5]; Query[0] = new iControl.SystemStatisticsPerformanceStatisticQuery(); // <-- Added this to create the first object. Query[0].object_name = "memory"; Query[0].start_time = 0; Query[0].end_time = 0; Query[0].interval = 0; Query[0].maximum_rows = 0; interfaces.SystemStatistics.get_performance_graph_csv_statistics(Query); }







Server Error in '/bigiplb' Application.




Could not find element by name: object_name



Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.



Exception Details: System.Web.Services.Protocols.SoapHeaderException: Could not find element by name: object_name Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack



Trace: [SoapHeaderException: Could not find element by name: object_name] System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +431766 System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +204 iControl.SystemStatistics.get_performance_graph_csv_statistics(SystemStatisticsPerformanceStatisticQuery[] objects) +107 icontrol_1.Throughput.Button1_Click(Object sender, EventArgs e) in D:\Documents and Settings\jay.nielson\My Documents\Visual Studio 2005\Projects\icontrol_1\icontrol_1\Throughput.aspx.cs:79 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565




Version Information: Microsoft .NET Framework Version:2.0.50727.3625; ASP.NET Version:2.0.50727.3634

7 Replies

  • Could it be that you are allocating an array of size '5' for the Query parameter but are only allocating and filling the structure in the first element?



    The error "could not find element by name: xxx" means that the client isn't serializing the parameter or structure element and that most often occurs when something is passed in as a null value. I'd try changing the Query definition to an array size of 1 and trying again.



    Let me know if that doesn't work...





  • BTW, here's a tech tip I wrote a while back on the performance statistics methods:





    It's in PowerShell but might help guide you in the right direction...



  • Yes that tech tip is what I started with when I was researching this. Unfortunatley, I don't think powershell is allowed on the network I am working on. I have reviewed many articles and got the impression it was query[0] all the way down. Most of the ways I have changed it make it not compile, not sure what I am missing but I do think it is Query definition if its a code issue at all
  • That seems to get me past my issue, I could have sworn I tried that several times. Oh well I'll add the valuable stuff to this post after I get it done.
  • I just tested out the code by setting the array size to 1 instead of 5 and it works for me. Here's something that should get you going:



    void getPerformanceGraphCSV()
        iControl.SystemStatisticsPerformanceGraph[] graph_list = 
        for(int i=0; i < graph_list.Length; i++)
            iControl.SystemStatisticsPerformanceStatisticQuery[] queries = 
              new iControl.SystemStatisticsPerformanceStatisticQuery[1];
            queries[0] = new iControl.SystemStatisticsPerformanceStatisticQuery();
            queries[0].object_name = graph_list[ i ].graph_name;
            queries[0].start_time = 0;
            queries[0].end_time = 0;
            queries[0].interval = 0;
            queries[0].maximum_rows = 0;
            iControl.SystemStatisticsPerformanceGraphDataCSV[] graph_dataA =
            for (int j = 0; j < graph_dataA.Length; j++)
                Console.WriteLine("Graph      : " + graph_dataA[j].object_name);
                Console.WriteLine("Start Time : " + graph_dataA[j].start_time);
                Console.WriteLine("End Time   : " + graph_dataA[j].end_time);
                Console.WriteLine("Interval   : " + graph_dataA[j].interval);
                String csv_data = System.Text.Encoding.ASCII.GetString(graph_dataA[j].statistic_data);



    Hope this helps...



  • In this example, I broke the call apart to only call get_performance_graph_csv_data once for each graph, but you could combine them all in a single query if you want to eliminate multiple calls.
  • Yes the 5 to 1 change worked for me as well. I don't know how I overlooked that, but it definitely gets me goin good now.



    I am gonna implement the String csv_data = System.Text.Encoding.ASCII.GetString(graph_dataA[j].statistic_data); part and such on Monday, but I am confident I should be able to get some data stored and built up using this. When I get it fleshed out I'll donate what I got to this thread