Select Your Language

Infrastructure and Management

Cloud Computing

Storage

Runtimes

Integration and Automation

  • Comments
    • Posted in
    • Tags

    How to generate a report of all changed config channel files?

    Posted on
    I'm working on building a report to show all the changed files for all the systems 
    in my satellite, but I can't quite seem to find any useful information in the API. 
    What I would like is report that mirrors the information found by the scheduled action: 
        "Show differences between profiled config files and deployed config files"
    
    The problem, as usual, is the information in the WebUI is not condusive 
    to reporting on large numbers of systems, and the API doesn't have it. 
    The closest thing are the system.config methods, but they don't have any 
    way to directly compare information. 
    
    I've considered hitting all the client systems and running rhncfg-client verify (yuck), 
    or trying to webscrape the WebUI (more yuck). 
    
    I'd like to produce something like the rhncfg-client verify output but 
    from the backend that would look something like this for every system:
    
    system: foo
    system_id:100000100
    modified_files: {
    {name: "/etc/sudoers", type: "file", system_rev: "5", channel: "base-files", sat_rev:"7"}, 
    {name: "/etc/sudoers.d", type: "directory", system_rev: "3", channel: "override-files", sat_rev:"5"}
    } 
    
    The only thing that appears to have anything related to this level of file comparison is 
    the scheduled action to compare files. It doesn't look like this type of data exists normally. 
    So looking at scheduleFileComparisons(), that doesn't really help any.
      
    Notwithstanding the problem of having to schedule for each individual file path for 
    every server in the list, it's a scheduled action, so I don't know when it's complete. 
    Getting the actionId doesn't tell me anything useful, either. So, once that activity is done, 
    I can't do anything with the results, and I have to wait X hours to get the info in the first place.  
    
    If it had something in the API like configchannel.getActionResults() 
    that allowed me to traverse the details of the action I scheduled, that 
    would be useful. eg, 
     
    Method: getComparisonResults() 
    Description: 
    Get Detailed Results of a given Action 
     
    parameters: 
     string sessionKey 
     int actionId 
     
    Returns: 
     struct - comparisonDetails 
     int "id" - action Id 
     ... whatever other basic action info ... 
     struct - iterable list of systems to see the actual 
              results of the comparison  
    
    The key part is to be able to actually look at the comparison results 
    for a given action, and that doesn't currently exist. What I'm looking 
    for is an API equivalent to: 
     htp://satserver/rhn/schedule/CompletedSystems.do 
     
    It shows a list of all servers, where you can drill down on a given server and 
    see all the file comparisons, which is exctly what I want, but it's not
    something that exists in a report format. 

    by

    points

    Responses

    Red Hat LinkedIn YouTube Facebook X, formerly Twitter

    Quick Links

    Help

    Site Info

    Related Sites

    © 2026 Red Hat