Git Product home page Git Product logo

munkireport-php's Introduction

MunkiReport

MunkiReport is a reporting client for macOS. While originally dependent on Munki, MunkiReport is able to run stand-alone or to be coupled with Munki, Jamf or other macOS management solutions.

Dashboard view

Features

  • Quick overview of your macOS fleet with a customizable dashboards
  • Get reports on many features (hardware types, disk usage, etc)
  • Extendable with a growing list of modules
  • Lightweight: only sends reports when facts have changed
  • Responsive webdesign
  • more features

Setup

Setup is easy, you could be running your own reporting server within minutes!

Please read the demonstration setup.

System Requirements

Serverside:

  • A webserver (runs fine with Apache, IIS and nginx)
  • php version 8.1 or higher with pdo-sqlite3 and libxml

Clientside

  • a Modern webbrowser

Mailing lists

For questions about using MunkiReport or setting up MunkiReport, you can use:

https://groups.google.com/group/munkireport

For developers who want to contribute to the project:

https://groups.google.com/group/munkireport-dev

For security related issues, please use the private mailinglist:

https://groups.google.com/group/munkireport-security

Contributing

If you want to contribute to MunkiReport, please

External projects

MunkiReport makes use of these fine software packages:

munkireport-php's People

Contributors

bochoven avatar choules avatar clburlison avatar computeronix avatar cwhits avatar danner26 avatar dingerkingh avatar diwanicki avatar erikng avatar fridomac avatar gmarnin avatar gregneagle avatar jbw0p68c3g8h avatar joncrain avatar joshua-d-miller avatar kevinmcox avatar little2112 avatar lolipale avatar magervalp avatar mosen avatar n8felton avatar nathanperkins avatar pnerum avatar poundbangbash avatar rickheil avatar sphen13 avatar tuxudo avatar wardsparadox avatar wollardj avatar znerol avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

munkireport-php's Issues

Munki version not getting updated

I am testing the new version of Munkitools on a few of our systems. If I install the new version of the tools before installing munkireport, it reports the correct version in the web interface. If I update the tools after installing munkireport, the web interface continues to show the old version of Munki.

Web interface:
screen shot 2013-12-12 at 9 17 19 am

version as reported by the client:
screen shot 2013-12-12 at 9 17 47 am

LDAPv3 Binding

Just wanted to see if there a version of the directoryservice.sh command that will account for OpenDirectory or LDAPv3 connections. Right now the code only appears to check for AD attributes.

Remove Login

Is there a way to remove the login, so it automatically logs in?

user and password are sent in clear text

user and password are sent in clear text. Maybe we should add support for self-signed ssl or similar

Edit: my bad. this is more than likely possible already. I'd like to document the method then

Clicking on "Recheck warranty Status"

Hi

On the page detailing all the information about an individual host the warranty information does not get filled in until i have click the "Check warranty Status" is there a way to a) do this automatically or b) run it for all machine in one go

Thanks

Module case conventions causing errors...

By default the installation does not work correctly on our server because it attempts to load the 'Disk_report/Disk_report_model.php' when the distribution actually contains 'disk_report/disk_report_model.php'.

Enabling the debug config mode spews out the error:

Fatal error: require_once(): Failed opening required '/opt/munkiweb//app/modules/Disk_report/Disk_report_model.php' (include_path='.:/usr/share/pear:/usr/share/php') in /opt/munkiweb/app/helpers/site_helper.php on line 72

Once we symlinked the case sensitive versions across, things started to work again. I'm guessing this will be a case on all case-sensitive filesystems, as used on Linux (i.e. this will not be evident on Mac OS X as it uses a case-preserving but case-insensitive filesystem)

For now a quick fix for that part seems to be symlinking, or updating the app/helpers/site_helper.php#__autoload to

require_once( APP_PATH.'modules/'.strtolower($module).'/'.strtolower($module).'_model'.EXT );

However, the client details page remains broken as that then spews out another error for 'models/Inventoryitem.php' when the file is actually named 'InventoryItem.php':

Fatal error: require_once(): Failed opening required '/opt/munkiweb//app/models/Inventoryitem.php' (include_path='.:/usr/share/pear:/usr/share/php') in /opt/munkiweb/app/helpers/site_helper.php on line 76

Again, fixed by symlinking the two together.

Looking through the files of this app there appears to be a tonne of differing case conventions going on, which will not be flagged when developing on OS X but will explode the code on Linux servers.

Requirements check page

It would be useful to have a webpage that checks all requirements (php version, xml-lib, pdo). Troubleshooting will be easier.

Facter

Have you ever considered adding the gem Facter to your project as a means of data collection? It could be added to the pkginfo as a pkg install along with the collection scripts.

Manifest editing

Would there be a way we could add the ability to edit the manifest associated with the client like MunkiWebAdmin?

Report on ARD Info Fields 1-4

The ARD info fields are often populated with useful unique data specific to each org. Some populate the fields with an asset number or image version number. It would be useful if MunkiReport reported on the fields in the client details page.

Settings page

It would be great to have a settings page where to change MR2 settings. All from minor things like site name and company logo, to more important like user permissions and database settings. All from a gui

Add Local Admin reporting

MR1 had the option to add a column under the Client view on the Reports Page to show the local admin accounts for each machine. Is it possible to add this back to MR2?

Thanks,
Scott

Tabs on client detail page do not work

When clicking on any of the tabs on a client detail page the url updates with the respective # suffix (e.g. /clients/detail/C07XXXXXXXXX#apple-software) but does not update the tab content.

I've tested this across firefox, chrome and safari. I'm assuming it's something wrong with my config? Can you advise on any possible troubleshooting?

cheers

Matt

disable/enable modules

Add the possibility to disable modules which collect data that I am not interested in.

installer bug

When running the installer command (/bin/bash -c "$curl -s http://example/index.php?/install) The installer fails at the install Network report step. Line 184 has a slash before index.php which leads to a URL with a double slash (i.e.: http://example.com//index.php?/module/network/get_script/networkinfo.sh)

The installer fails at this point. Editing the installer script and running manually works fine.

EDIT: bug is actually on line 6 of app/modules/network/scripts/install.sh Line 184 is when it dumped the install to >/tmp/install.sh via the curl command above.

Purchase Date calculation with 4 Year AppleCare

The purchase date gets incorrectly set when the computer in question is covered by a 4 Year AppleCare plan. The calculation for the date in the warranty_helper.php just subtracts 3 years from the warranty end. This also results in an Age graph that is not accurate.

Localize strings in views

Munkireport has a lot of hardcoded strings that should be converted to a localisable string.

Here's a list of views (checked views are done)

  • auth
  • client
  • dashboard
  • inventory
  • listing
  • partials
  • report
  • widgets

Migrating 2.0.4 to 2.0.5 gives errors

Migrating MR 2.0.4 to 2.0.5 results in migration errors:

• Migration error: no migrations found in /Library/WebServer/Documents/reposado/html/munkireport//app/migrations/machine_model
• Migration error: Failed: SQLSTATE[HY000]: General error: 1 duplicate column name: adforest

Directory Services report fails to load json data table

When clicking on the Directory Services listing I get the following error as a pop up.

DataTables warning (table id = 'DataTables_Table_0'): DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.

Hard Drive Space

All of my machines are showing the same message about hard drive space free/size -
screen shot 2013-11-01 at 1 26 26 pm

The percentages seem to be correct though.

I am using Filevault, which may have something to do with it. Is there a way to correct this easily?

multiple search filters

Currently the pending updates table is the only table that allows empty spaces between search words and searches across all columns.

This feature was in mr-phpv1 and it was quite helpful to filter

Memory widget is not linking correctly

Hi
The memory widget is showing that i have a machine with 12GB of RAM, when i click on the link to go to the hardware page it is empty and no machine are listed, and if i show all on the hardware page and then sort by memory the 12GB is at the top of the page even though i have machine with 16+GB of RAM

memorywidget

image

Postflight script from postflight.d folder

Hello. Please check this code for accuracy as I have used your code to make the postflight script execute postflight scripts in the postflight.d folder. I am performing this as I would still like to report to use MunkiWebAdmin for the time being.

PostFlight (MunkiReport-PHP)
http://pastebin.com/jEzR6Tm8

submit.postflight (/usr/local/munki/postflight.d)
http://pastebin.com/sLZGBueL

If these are correct feel free to add them to your repository to allow postflight scripts in /usr/local/munki/postflight.d

Thank you!

include module scripts in pkginfo

The pkinfo file downloaded from /index.php?/install/plist only includes an empty file inside the installs key. If a script somehow gets deleted from the preflight.d folder there will be no way to know and munki will not self-heal the installation.

As suggested by @natewalck it would be interesting to include the scripts in the installs key.

I tried to implement this myself but couldn't get the $install_scripts array to the plist without doing a very a hacky solution.

cat ./munkireport-php/app/views/install/install_plist.php

...
    <key>installs</key>
    <array>
        <dict>
            <key>path</key>
            <string>/usr/local/munki/munkireport-<?php echo $version; ?></string>
            <key>type</key>
            <string>file</string>
        </dict>
        <?php
            foreach($install_scripts AS $scriptname){
            echo '<dict>
            <key>path</key>
            <string>/usr/local/munki/postflight.d/' . $scriptname  . '</string>
            <key>type</key>
            <string>file</string>
        </dict>
    ';
            }
        ?>
    </array>
...

Implement database migrations

Currently when modifying a module to include more data or remove existing, the create_table() function is not able to accommodate the changes if the table exists.

The current if(isset()) should be modified to check existing columns vs. provided columns, and create when needed. Unused columns should probably be preserved to keep their data

Move models to correct modules

There are some legacy models that should be moved to the correct module:

  • installhistory
  • inventoryitem
  • machine
  • munkireport
  • network
  • reportdata
  • warranty

This is somewhat disruptive as the clients need to be re-configured to use the correct names. I want to add this to the 2.0.5 release.

MunkiReport Performance

Improve performance of MunkiReport's "Listings" views. The "Clients" view, in particular, takes a long time to load (20-70 seconds for a MySQL db with 2800 clients).

Summary table is rendered incorrectly if there is blank data

I have a few misbehaving clients that are sending back blank or empty data from some of the modules. I need to look at these clients more carefully and determine what is going wrong (it looks like one of the grep lines in the filevault check is not returning any output) but in the meantime some of the summary tables in the dashboard display are rendered incorrectly - they are partially cut off.

screen shot 2013-12-17 at 7 02 18 am

# of records per page options.

In MR1, there were options to show 25, 100, and "ALL" records per page. In MR2 there are only options 10, 25, 50, 100 records per page. Is there a way to add the "ALL" records per page back to MR2? I frequently used this to sort different data in different ways.

Thanks!!!
Scott

Using Apache2 authnz_ldap, auth required

So I tried to disable the built-in authentication($conf['auth']['auth_noauth'] = array();) in favor of using ldap on the site itself (through an apache2 vhost), and (admittedly, I should have predicted this) I am now getting this result when running managedsoftwareupdate:

http://munkibusiness.onehealth.com/index.php?/report/hash_check We failed to reach a server. Reason: Authorization Required

I know you added in the ability to use external auth like AD and LDAP, my question is how do you actually implement this?

OS X 10.5.8 reports disk size as -2.00 GB

A school district I'm working for has some (many) machines still running 10.5.8. MunkiReport works great except for the disk info, from what I have seen.

This is what shows on the client detail page for all 10.5.8 machines:
Disk size -2.00 GB
Used 0.00 B
Free -2.00 GB
SMART Status Verified

Here is the output from diskutil info -plist / on one of our 10.5.8 machines:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Bootable</key>
    <true/>
    <key>BusProtocol</key>
    <string>SATA</string>
    <key>CanBeMadeBootable</key>
    <false/>
    <key>CanBeMadeBootableRequiresDestroy</key>
    <false/>
    <key>Content</key>
    <string>Apple_HFS</string>
    <key>DeviceIdentifier</key>
    <string>disk0s2</string>
    <key>DeviceNode</key>
    <string>disk0s2</string>
    <key>DeviceTreePath</key>
    <string>/PCI0/SATA@1F,2/PRT0@0/PMP@0/@0:2</string>
    <key>Ejectable</key>
    <false/>
    <key>FilesystemName</key>
    <string>Journaled HFS+</string>
    <key>FreeSpace</key>
    <integer>253546201088</integer>
    <key>GlobalPermissionsEnabled</key>
    <true/>
    <key>Internal</key>
    <true/>
    <key>JournalOffset</key>
    <integer>91222016</integer>
    <key>JournalSize</key>
    <integer>25165824</integer>
    <key>MediaName</key>
    <string>Untitled</string>
    <key>MediaType</key>
    <string>Generic</string>
    <key>MountPoint</key>
    <string>/</string>
    <key>ParentWholeDisk</key>
    <string>disk0</string>
    <key>RAIDMaster</key>
    <false/>
    <key>RAIDSlice</key>
    <false/>
    <key>SMARTStatus</key>
    <string>Verified</string>
    <key>SupportsGlobalPermissionsDisable</key>
    <true/>
    <key>SystemImage</key>
    <false/>
    <key>TotalSize</key>
    <integer>296812326912</integer>
    <key>VolumeName</key>
    <string>Macintosh HD</string>
    <key>VolumeUUID</key>
    <string>3A7C7955-DF2A-36C2-8FE4-47264A9CC7E4</string>
    <key>WholeDisk</key>
    <false/>
    <key>Writable</key>
    <true/>
</dict>
</plist>

Love the project! Hopefully we will get these machines upgraded before 10.5 support in Munki is dropped...

Implement client authentication

We would like the ability to use authentication from the Munki client for posting reports. Munki itself can optionally send a username/password to authenticate to the web repo, and we'd like the ability to do the same with the reporting.

Call to a member function bindValue()

Hi

After pulling the latest updates ( inc the directory services one) i get the following error when running managedsoftwareupdate

Fatal error: Call to a member function bindValue() on a non-object in /opt/munkiweb/system/kissmvc_core.php on line 472
Done.

Any help would be great

Update documentation

docs/configure.md should have a nice writeup about all the configuration items of munkireport.

stop nicely if server down

If the reporting server is unavailable, the script should exit nicely and allow Munki to run. Currently, it returns an error and managedsoftwareupdate will not run.

Add support for MySQL STRICT_TRANS_TABLES

disk_report is requested in the postflight script but does not populate disk statistics when MunkiReport is using a MySQL 5.6 database. Downgrading MySQL to 5.5.35 resolves the issue.

Remove clients from munkireport database

Would like to have the ability to remove clients from munkireport-php without going into the database. Ideally, both sqlite3 and mysql methods should be supported.

Run munkireport on preflight as well

If a client is not able to connect to the munki server, the postflight script does not run. That means that munkireport only receives machine- and report data updates. It would be nice to receive all updates on preflight as well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.