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

Integrating Jamf with Splunk & JasperReports

9d350fa2294e1192f8f12b0ebf1a1d8b?s=47 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/.

9d350fa2294e1192f8f12b0ebf1a1d8b?s=128

Jamf

October 25, 2018
Tweet

More Decks by Jamf

Other Decks in Technology

Transcript

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

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

    Presentation agenda: •Preparing MySQL for Remote Access •Splunk Integration •JasperReports Integration •Q&A
  4. © 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
  5. © 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)
  6. © JAMF Software, LLC Splunk Integration • Modular Input with

    Jamf API • Database Connection Available on Jamf Marketplace
  7. © JAMF Software, LLC Advanced Search • Define Advanced Search

    • Computers • Mobile Device
  8. © JAMF Software, LLC Modular Input • $SPLUNK_HOME = /opt/splunk/

    • Clone the repository • Restart Splunk
  9. © 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
  10. © 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
  11. © JAMF Software, LLC Configure Database Connection • Define a

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

  13. © 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
  14. © JAMF Software, LLC Search Processing Language (SPL) • Search

    your data • Pipe to other Splunk Commands • Build dashboards & Visualize https://docs.splunk.com/Splexicon:Searchprocessinglanguage
  15. © JAMF Software, LLC Splunk Reporting

  16. © JAMF Software, LLC More Splunk Searches https://docs.splunk.com/Splexicon:Searchprocessinglanguage

  17. © JAMF Software, LLC Visualizations

  18. © JAMF Software, LLC JasperReports Integration • Install JasperReports on

    a server • Install Jaspersoft Studio on a client 2 components to install
  19. © 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
  20. © JAMF Software, LLC Connect to the Server http://reports.lab.private:8080/jasperserver/login.html Default

    Credentials: User ID: jasperadmin Password: jasperadmin
  21. © JAMF Software, LLC Add a Data Source Right-click Data

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

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

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

  25. © JAMF Software, LLC Configure Jaspersoft Suite Add a connection

    to the JasperReports server
  26. © JAMF Software, LLC Configure Jaspersoft Suite Be sure to

    leave the Organization field blank
  27. © JAMF Software, LLC Configure Jaspersoft Suite Add a connection

    to the jamfsoftware database
  28. © JAMF Software, LLC Configure Jaspersoft Suite Select the type

    of connection we need
  29. © JAMF Software, LLC Configure Jaspersoft Suite Configure the connection

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

  31. © JAMF Software, LLC Create a Report

  32. © JAMF Software, LLC Create a Report

  33. © JAMF Software, LLC Create a Report

  34. © JAMF Software, LLC Create a Report MySQL query goes

    here.
  35. © JAMF Software, LLC Create a Report The MySQL query

  36. © JAMF Software, LLC Create a Report

  37. © JAMF Software, LLC Create a Report

  38. © JAMF Software, LLC Create a Report

  39. © JAMF Software, LLC Create a Report

  40. © JAMF Software, LLC Create a Report

  41. © JAMF Software, LLC Create a Report

  42. © JAMF Software, LLC Create a Report

  43. © JAMF Software, LLC Create a Report

  44. © JAMF Software, LLC Create a Report 1 2 Set

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

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

    next to Label Set the value to OS Version
  47. © JAMF Software, LLC Create a Report Click Finish, then

    Preview the report
  48. © JAMF Software, LLC Sample Report

  49. © JAMF Software, LLC Publish the Report Make the report

    available on the JasperReports server, click publish
  50. © JAMF Software, LLC Publish the Report Select a location,

    like Reports, to store the report
  51. © JAMF Software, LLC Publish the Report Select a Data

    Source 1 2
  52. © JAMF Software, LLC Publish the Report Use jamfsoftware as

    the Resource
  53. © JAMF Software, LLC Publish the Report Review the settings

    and click Finish
  54. © JAMF Software, LLC Publish the Report Once the report

    is saved click OK, then view the report on the JasperReports server
  55. © JAMF Software, LLC View the Report Click our report

    to view it
  56. © JAMF Software, LLC View the Report The report can

    be exported in several formats Enable SMTP so the reports can be distributed
  57. © 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
  58. © 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 report.scheduler.mail.sender.from=admin@example.com report.scheduler.mail.sender.protocol=smtp report.scheduler.mail.sender.port=25
  59. © 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) report.scheduler.mail.sender.from=reporter@lab.private report.scheduler.mail.sender.protocol=smtp report.scheduler.mail.sender.port=25
  60. © JAMF Software, LLC Enable SMTP in JasperReports Restart the

    JasperReports webapp: sudo /opt/jasperreports-server-cp-7.1.0/ctlscript.sh restart
  61. © JAMF Software, LLC Schedule the Report Right-click the report

    and select Schedule…
  62. © JAMF Software, LLC Schedule the Report Create Schedule

  63. © JAMF Software, LLC Schedule the Report Set the schedule

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

    options We’ll be emailing the report, no need to store it locally
  65. © JAMF Software, LLC Schedule the Report Configure the notification

    options
  66. © JAMF Software, LLC Emailed Report

  67. © JAMF Software, LLC Jamf Marketplace

  68. © JAMF Software, LL THANK YOU!