Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Integrating Jamf with Splunk & JasperReports

Jamf
October 25, 2018

Integrating Jamf with Splunk & JasperReports

Presentation from JNUC 2018, the world's largest rally of Apple IT administrators.

Session:
Integrating Jamf with Splunk & JasperReports

Presented by:
Leslie Helou, Jamf
Matt Armstrong, Jamf

View all session slides, recordings and more at https://www.jamf.com/events/jamf-nation-user-conference/2018/.

Jamf

October 25, 2018
Tweet

More Decks by Jamf

Other Decks in Technology

Transcript

  1. © JAMF Software, LLC Matt Armstrong Senior Systems Engineer, Research

    Jamf Leslie N. Helou Senior Professional Services Engineer Jamf 275x275 head shot 275x275 head shot
  2. © JAMF Software, LLC Integrating Splunk and JasperReports with Jamf

    Presentation agenda: •Preparing MySQL for Remote Access •Splunk Integration •JasperReports Integration •Q&A
  3. © JAMF Software, LLC Prepare MySQL for Remote Access 1.

    Modify my.cnf or mysql.cnf or mysqld.cnf to allow connections from remote hosts. change: bind-address = 127.0.0.0 to: bind-address = 0.0.0.0 2 Steps
  4. © JAMF Software, LLC Prepare MySQL for Remote Access 2.

    Create an account within MySQL with read- only (select) permissions to run the queries. mysql> grant select on jamfsoftware.* to myreport@'10.1.1.%' identified by 'Myr3pOr+'; (optional)
  5. © JAMF Software, LLC Splunk Integration • Modular Input with

    Jamf API • Database Connection Available on Jamf Marketplace
  6. © JAMF Software, LLC Modular Input • $SPLUNK_HOME = /opt/splunk/

    • Clone the repository • Restart Splunk
  7. © JAMF Software, LLC Configure Modular Input • Define an

    index • Add a Jamf Modular Input • Jamf Pro URL • computer or mobile_device Integrate Advanced Search with Splunk
  8. © JAMF Software, LLC Database connection • Install Java -

    must be Oracle-JDK! • Install Splunk DB Connect • Install mysql driver • Copy driver to Splunk DB Connect app Prerequisites
  9. © JAMF Software, LLC Configure Database Connection • Define a

    mysql user on Jamf DB • Create Identity • Create DB Connection Connect Splunk to Jamf Pro Database
  10. © JAMF Software, LLC Splunk DB Query • Define a

    mysql user on jamf DB • Create Splunk Identity • Create Splunk DB Connection • Define Query • Create Splunk Input Query Jamf Pro Database
  11. © JAMF Software, LLC Search Processing Language (SPL) • Search

    your data • Pipe to other Splunk Commands • Build dashboards & Visualize https://docs.splunk.com/Splexicon:Searchprocessinglanguage
  12. © JAMF Software, LLC JasperReports Integration • Install JasperReports on

    a server • Install Jaspersoft Studio on a client 2 components to install
  13. © JAMF Software, LLC Install the Server - JasperReports •

    Runs on Windows, Linux and Mac • Can use the bundle installer or use existing Tomcat and/or PostgreSQL • System Requirements Resource Footprint Minimum Recommended Disk ~1.5 GB 10GB free 40GB+ RAM 4GB 8GB+ Processor 2 cores 2.5GHz + multi-core Pentium
  14. © JAMF Software, LLC Add a Data Source Right-click Data

    Source Move the mouse over Add Resource Click Data Source
  15. © JAMF Software, LLC Max image dimensions Configure the Type

    and Properties • JDBC Driver • Host (MySQL server) • Port • Database • User Name • Password
  16. © JAMF Software, LLC Install the Client - Jaspersoft Studio

    • Runs on Windows, Linux, and Mac We’ll install it on a Mac
  17. © JAMF Software, LLC Configure Jaspersoft Suite Configure the connection

    similar to what we did on the JasperReports server, Data Source
  18. © JAMF Software, LLC Create a Report 1 2 Set

    Dataset to [Main Dataset] Click the ellipsis next to Value
  19. © JAMF Software, LLC Create a Report Delete the existing

    text Click Fields, then double-click Count Field Long
  20. © JAMF Software, LLC Create a Report Click the ellipsis

    next to Label Set the value to OS Version
  21. © JAMF Software, LLC Publish the Report Make the report

    available on the JasperReports server, click publish
  22. © JAMF Software, LLC Publish the Report Once the report

    is saved click OK, then view the report on the JasperReports server
  23. © JAMF Software, LLC View the Report The report can

    be exported in several formats Enable SMTP so the reports can be distributed
  24. © JAMF Software, LLC Enable SMTP in JasperReports sudo vi

    /opt/jasperreports-server-cp-7.1.0/ apache-tomcat/webapps/jasperserver/WEB- INF/js.quartz.properties
  25. © JAMF Software, LLC Enable SMTP in JasperReports Locate and

    edit the following block: report.scheduler.mail.sender.host=mail.example.com report.scheduler.mail.sender.username=admin report.scheduler.mail.sender.password=password [email protected] report.scheduler.mail.sender.protocol=smtp report.scheduler.mail.sender.port=25
  26. © JAMF Software, LLC Enable SMTP in JasperReports report.scheduler.mail.sender.host=mail.lab.private report.scheduler.mail.sender.username=(may

    not be needed) report.scheduler.mail.sender.password=(may not be needed) [email protected] report.scheduler.mail.sender.protocol=smtp report.scheduler.mail.sender.port=25
  27. © JAMF Software, LLC Enable SMTP in JasperReports Restart the

    JasperReports webapp: sudo /opt/jasperreports-server-cp-7.1.0/ctlscript.sh restart
  28. © JAMF Software, LLC Schedule the Report Set the schedule

    options: • Start date/time • Recurrence • When to end
  29. © JAMF Software, LLC Schedule the Report Set the output

    options We’ll be emailing the report, no need to store it locally