Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

advanced host search and export / import problem

syn2ack
2013-11-12
2013-11-27
  • syn2ack
    syn2ack
    2013-11-12

    hello,

    I am running v3.0 (patch version 24) and I found a bug. When I perform a advance host search, the report shows the expected hosts. I have several custom columns. the report shows the last column, "network".. 14 columns total. (I'm sure I previously removed this column) when I export to a spreadheet, the last column does not appear. When I go to import, the data is no longer updated. If I add the extra column in the spreadsheet, it is not recognized anything when I try to import.

    somewhere along the line, the data got skewed.. the serial column got populated with vendor.. vendor got populated with some other column. my spreadsheet is accuarte.. I hope I can recover this information back into the database.

    httpd error log has this -

    Can't use an undefined value as an ARRAY reference at ../modules/GestioIP.pm line 5072., referer: http://host:8080/gestioip/res/ip_modip_form.cgi

    I just updated the actualize this morning.. from 20. not sure if it ok to skip?

    thank you.

     
  • Marc Uebel
    Marc Uebel
    2013-11-12

    Hi
    Thanks a lot for reporting that issue. I will try to reproduce it, and tell you something, soon.
    Regards
    Marc

     
  • Marc Uebel
    Marc Uebel
    2013-11-15

    Hi
    Please check the audit log if the column "network" was deleted (event: host column deleted)
    There was a bug in relation with the advanced host search and a column mismatch which was fixed with patch 22. It's OK that you upgraded to 24.

    Up to now I was not able to reproduce the problem but I will make some more test.
    Regards
    Marc

     
  • syn2ack
    syn2ack
    2013-11-15

    I'm not able to see the entry in the web audit log viewer.. I can try pulling it out mysql, if you could please provide the table to look at. sql syntax suggestion.. I'm not sure where to look.

    trying to search in audit, I encountered another bug.. My web server is running on port 8080. but the audit script seems to forget which port it should be running on and looses the full path http://host:8080/gestioip/res/show_audit.cgi goes to
    http://host/gestioip/res/show_audit.cgi

    let me know if I can provide any other tests or information.
    and if you know a quick edit to correct this port re-direction issue..

    I suspect this lines needs modified.. but i'm not sure the best way to correct this..

    show_audit.cgi:my $cgi = "$ENV{SERVER_NAME}" . "$ENV{SCRIPT_NAME}";

    to something like what's in ip_splitred_check.cgi with "base_uri" to get audit to work.. ?

     
    Last edit: syn2ack 2013-11-15
    • Marc Uebel
      Marc Uebel
      2013-11-18

      Hi
      Thanks lot for reporting that, too. This issue will be fixed with the next patch.
      Regards
      Marc

       
      • Marc Uebel
        Marc Uebel
        2013-11-18

        Hi
        If you like to fix it by yourself you need to modify GestioIP.pm and show_audit.cgi:

        diff GestioIP.pm.orig GestioIP.pm
        3425c3425
        <       print "<tr align=\"left\"><td nowrap align=\"center\"><form name=\"printredtabheadform\" method=\"POST\" action=\"$server_proto://$cgi\">$all_clients_show</td><td nowrap $align1><input type=\"radio\" value=\"time_range\" name=\"time_radio\" onclick=\"start_date.disabled=true;end_date.disabled=true;time_range.disabled=false;\" checked> $lang_vars{last_message}</td><td $align1> </td><td $align1><input type=\"radio\" value=\"start_end_time\" name=\"time_radio\" onclick=\"start_date.disabled=false;end_date.disabled=false;time_range.disabled=true;\"> $lang_vars{date_message} $lang_vars{start_date_message}</td><td $align1></td><td $align1>$lang_vars{end_date_message}</td><td $align1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td $align1>$lang_vars{search_string_message}</td><td $align1>$lang_vars{event_type_message}</td><td $align1>$lang_vars{class_message}</td><td $align1>$lang_vars{event_message}</td><td $align1>$lang_vars{entradas_por_pagina_message}</td><td></td></tr>\n";
        ---
        >       print "<tr align=\"left\"><td nowrap align=\"center\"><form name=\"printredtabheadform\" method=\"POST\" action=\"$server_proto://$base_uri/res/show_audit.cgi\">$all_clients_show</td><td nowrap $align1><input type=\"radio\" value=\"time_range\" name=\"time_radio\" onclick=\"start_date.disabled=true;end_date.disabled=true;time_range.disabled=false;\" checked> $lang_vars{last_message}</td><td $align1> </td><td $align1><input type=\"radio\" value=\"start_end_time\" name=\"time_radio\" onclick=\"start_date.disabled=false;end_date.disabled=false;time_range.disabled=true;\"> $lang_vars{date_message} $lang_vars{start_date_message}</td><td $align1></td><td $align1>$lang_vars{end_date_message}</td><td $align1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td $align1>$lang_vars{search_string_message}</td><td $align1>$lang_vars{event_type_message}</td><td $align1>$lang_vars{class_message}</td><td $align1>$lang_vars{event_message}</td><td $align1>$lang_vars{entradas_por_pagina_message}</td><td></td></tr>\n";
        3438c3438
        <       print "<tr align=\"left\"><td nowrap align=\"center\"><form name=\"printredtabheadform\" method=\"POST\" action=\"$server_proto://$cgi\">$all_clients_show</td><td nowrap $align1><input type=\"radio\" value=\"time_range\" name=\"time_radio\" onclick=\"start_date.disabled=true;end_date.disabled=true;time_range.disabled=false;\"> time range</td><td $align1> <b>$lang_vars{o_message}</b> </td><td $align1><input type=\"radio\" value=\"start_end_time\" name=\"time_radio\"  onclick=\"time_range.disabled=true;\" checked> $lang_vars{date_message} $lang_vars{start_date_message}</td><td $align1></td><td $align1>$lang_vars{end_date_message}</td><td $align1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td $align1>$lang_vars{search_string_message}</td><td $align1>$lang_vars{event_type_message}</td><td $align1>$lang_vars{class_message}</td><td $align1>$lang_vars{event_message}</td><td $align1>$lang_vars{entradas_por_pagina_message}</td><td></td></tr>\n";
        ---
        >       print "<tr align=\"left\"><td nowrap align=\"center\"><form name=\"printredtabheadform\" method=\"POST\" action=\"$server_proto://$base_uri/res/show_audit.cgi\">$all_clients_show</td><td nowrap $align1><input type=\"radio\" value=\"time_range\" name=\"time_radio\" onclick=\"start_date.disabled=true;end_date.disabled=true;time_range.disabled=false;\"> time range</td><td $align1> <b>$lang_vars{o_message}</b> </td><td $align1><input type=\"radio\" value=\"start_end_time\" name=\"time_radio\"  onclick=\"time_range.disabled=true;\" checked> $lang_vars{date_message} $lang_vars{start_date_message}</td><td $align1></td><td $align1>$lang_vars{end_date_message}</td><td $align1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td $align1>$lang_vars{search_string_message}</td><td $align1>$lang_vars{event_type_message}</td><td $align1>$lang_vars{class_message}</td><td $align1>$lang_vars{event_message}</td><td $align1>$lang_vars{entradas_por_pagina_message}</td><td></td></tr>\n";
        
        diff show_audit.cgi.orig show_audit.cgi
        33a34
        > my $base_uri = $gip->get_base_uri();
        177c178
        < my $cgi = "$ENV{SERVER_NAME}" . "$ENV{SCRIPT_NAME}";
        ---
        > #my $cgi = "$ENV{SERVER_NAME}" . "$ENV{SCRIPT_NAME}";
        188c189
        <           $pages_links = $pages_links . "<form name=\"printredtabheadform\" method=\"POST\" action=\"$server_proto://$cgi\" style=\"display:inline\"><input name=\"client_id\" type=\"hidden\" value=\"$client_id\"><input type=\"submit\" value=\"$n\" name=\"B2\" class=\"audit_page_link\" title=\"$start_title-$m\"><input name=\"time_range\" type=\"hidden\" value=\"$time_range\"><input name=\"search_string\" type=\"hidden\" value=\"$search\"><input name=\"start_date\" type=\"hidden\" value=\"$start_date\"><input name=\"end_date\" type=\"hidden\" value=\"$end_date\"><input name=\"event_class\" type=\"hidden\" value=\"$event_class\"><input name=\"event_type\" type=\"hidden\" value=\"$event\"><input name=\"time_radio\" type=\"hidden\" value=\"$time_radio\"><input name=\"entries_per_page\" type=\"hidden\" value=\"$entries_per_page\"><input name=\"start_entry\" type=\"hidden\" value=\"$l\"><input name=\"update_type_audit\" type=\"hidden\" value=\"$update_type_audit\"><input name=\"all_clients\" type=\"hidden\" value=\"$all_clients\"></form>\n";
        ---
        >           $pages_links = $pages_links . "<form name=\"printredtabheadform\" method=\"POST\" action=\"$server_proto://$base_uri/res/show_audit.cgi\" style=\"display:inline\"><input name=\"client_id\" type=\"hidden\" value=\"$client_id\"><input type=\"submit\" value=\"$n\" name=\"B2\" class=\"audit_page_link\" title=\"$start_title-$m\"><input name=\"time_range\" type=\"hidden\" value=\"$time_range\"><input name=\"search_string\" type=\"hidden\" value=\"$search\"><input name=\"start_date\" type=\"hidden\" value=\"$start_date\"><input name=\"end_date\" type=\"hidden\" value=\"$end_date\"><input name=\"event_class\" type=\"hidden\" value=\"$event_class\"><input name=\"event_type\" type=\"hidden\" value=\"$event\"><input name=\"time_radio\" type=\"hidden\" value=\"$time_radio\"><input name=\"entries_per_page\" type=\"hidden\" value=\"$entries_per_page\"><input name=\"start_entry\" type=\"hidden\" value=\"$l\"><input name=\"update_type_audit\" type=\"hidden\" value=\"$update_type_audit\"><input name=\"all_clients\" type=\"hidden\" value=\"$all_clients\"></form>\n";
        194c195
        <           $pages_links = "<form name=\"printredtabheadform\" method=\"POST\" action=\"$server_proto://$cgi\" style=\"display:inline\"><input name=\"client_id\" type=\"hidden\" value=\"$client_id\"><input type=\"submit\" value=\"$n\" name=\"B2\" class=\"audit_page_link\" title=\"$start_title-$m\"><input name=\"time_range\" type=\"hidden\" value=\"$time_range\"><input name=\"search_string\" type=\"hidden\" value=\"$search\"><input name=\"start_date\" type=\"hidden\" value=\"$start_date\"><input name=\"end_date\" type=\"hidden\" value=\"$end_date\"><input name=\"event_class\" type=\"hidden\" value=\"$event_class\"><input name=\"event_type\" type=\"hidden\" value=\"$event\"><input name=\"time_radio\" type=\"hidden\" value=\"$time_radio\"><input name=\"entries_per_page\" type=\"hidden\" value=\"$entries_per_page\"><input name=\"start_entry\" type=\"hidden\" value=\"$l\"><input name=\"update_type_audit\" type=\"hidden\" value=\"$update_type_audit\"><input name=\"all_clients\" type=\"hidden\" value=\"$all_clients\"></form>\n";
        ---
        >           $pages_links = "<form name=\"printredtabheadform\" method=\"POST\" action=\"$server_proto://$base_uri/res/show_audit.cgi\" style=\"display:inline\"><input name=\"client_id\" type=\"hidden\" value=\"$client_id\"><input type=\"submit\" value=\"$n\" name=\"B2\" class=\"audit_page_link\" title=\"$start_title-$m\"><input name=\"time_range\" type=\"hidden\" value=\"$time_range\"><input name=\"search_string\" type=\"hidden\" value=\"$search\"><input name=\"start_date\" type=\"hidden\" value=\"$start_date\"><input name=\"end_date\" type=\"hidden\" value=\"$end_date\"><input name=\"event_class\" type=\"hidden\" value=\"$event_class\"><input name=\"event_type\" type=\"hidden\" value=\"$event\"><input name=\"time_radio\" type=\"hidden\" value=\"$time_radio\"><input name=\"entries_per_page\" type=\"hidden\" value=\"$entries_per_page\"><input name=\"start_entry\" type=\"hidden\" value=\"$l\"><input name=\"update_type_audit\" type=\"hidden\" value=\"$update_type_audit\"><input name=\"all_clients\" type=\"hidden\" value=\"$all_clients\"></form>\n";
        

        Regards
        Marc

         
        • syn2ack
          syn2ack
          2013-11-18

          thanks! that fix works.

           
  • syn2ack
    syn2ack
    2013-11-15

    Hi, I wanted to include the latest snippet of error_log from httpd involving "advanced search".

    here is my workflow. this is very reproducible and does not involve importing spreadsheet. I perform an advance host search.. the results are expected. I selected a specific kind of host.. and I want to update the information for those hosts- namely "vendor" and "OS". So I click on the edit icon.. znd I am in "ip_modip_form.cgi" select vendor and OS. click "change" and this error appears in error_log. (attached)

    The web screen never recovers and I have to go to the top level and perform my search again. The change did take place and the new vendor and OS icon appears as expected.

     
    Attachments
    • Marc Uebel
      Marc Uebel
      2013-11-27

      Hi
      I can not reproduce the problem.
      I still did not got your message.
      Can you send it again?
      Regards
      Marc

       
  • Marc Uebel
    Marc Uebel
    2013-11-18

    Hi
    In my test installation, the problem does not occure.
    Please execute the following statements from the mysql command line:

    select * from custom_host_columns;
    select * from custom_host_column_entries;

    Please mail the output to contact@gestioip.net.
    Regards
    Marc

     
  • syn2ack
    syn2ack
    2013-11-18

    Hi,

    sent a message.. hopefully it does not appear in spam. :)

    fyi - the data in extra column called "network" appearing from from advance search is actually the description from the "net" table. so it might not be relevant?? not sure... but that is where the data is coming from.
    the IP is displayed, so, not sure if network description is needed?

    sent screenie pic too showing how the data got moved around in custom columns.. from my initial report about importing from spreadsheet.

    thanks.

     
  • Marc Uebel
    Marc Uebel
    2013-11-19

    Hi
    I did no receive your mail. Can you resend it, may be with a zipped attachement?
    Regards
    Marc