2 Replies Latest reply on Jun 29, 2011 9:25 AM by Javier Herraiz

    Compliance of identical files on the same server but different instances

    Javier Herraiz

      Hi There,

      Here is our situation:

       

      We would like to check the entrie of a  Apache http Server configuration file (httpd.conf file).

      The entrie we want to check is the line listen, that sets the port used for that particular instance. Ex. Listen=1080

       

      Our problem is that in only one server, we may have 20 different instances, therefore we have 20 different httpd.conf files.

       

      We have created an extended objet that does the following steps:

       

      1º Checks the services running that contains an httpd.conf , to make sure we only perform compliances in those httpd.conf where an instance is running.

      2º Check the path of all those httpd.conf files.

      3º Prints out the content of all httpd.conf files found on the machines.

       

      If an entrie is repeated, for example, the Listen line, the Extended object prints out the result as:

       

      Listen=1090

      Listen-1=1080

      Listen-2=1080

      ……

      Listen-19=1080 (This would be the twentieth entrie, since Listen=1080 would be the first one)

       

       

      4º We have created the following compliance rules with ** so we can check all Listen entries, no matter they are numbered.

       

      "Extended Object Entry:HTTPD_CONF//Listen"."Value1 as String (All OS)" contains "1080"  AND

      "Extended Object Entry:HTTPD_CONF//Listen**"."Value1 as String (All OS)" contains "1080"

       

      One you launch the discovery and the compliance job, the results shows you that some Listen entries are wrong in the following way:

       

      "Extended Object Entry:HTTPD_CONF//Listen **"."Value1 as String (All OS)" contains "1080"  AND

      "Extended Object Entry:HTTPD_CONF//Listen "."Value1 as String (All OS)" contains "1080"

       

      When you click on the red line to view the results, it tells you how many entries of the line Listen line are wrong.

      But it does not tell you in which particular instance, or httpd.conf file is the error.

      It gives you something similar to this

       

      "Extended Object Entry: HTTPD_CONF//Listen -1"."Value1 as String (All OS)" ["1090"] contains "1080"

      "Extended Object Entry: HTTPD_CONF//Listen -12"."Value1 as String (All OS)" ["1090"] contains "1080"

      "Extended Object Entry: HTTPD_CONF//Listen -17"."Value1 as String (All OS)" ["1090"] contains "1080"

       

      Now, We can go manually, and check, for which specific instance and httpd.conf file correspond:

      Listen-1

      Listen-12

      Listen-17

       

      Is there any other way to handle an issue like this one?

      It is a bit annoying not to have a clear result of witch instance of my server is the one that has the error.

      Maybe it is another way to handle this situation, and somebody can give us a bit of light with this problem.

       

      BR