Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converting megabytes to gigabytes #79

Open
kryptonit1 opened this issue May 17, 2022 · 3 comments
Open

Converting megabytes to gigabytes #79

kryptonit1 opened this issue May 17, 2022 · 3 comments

Comments

@kryptonit1
Copy link

It would be be nice if it was possible to automatically convert megabytes to gigabytes when collecting for example total_ram_mb or drive_capacity_mb from Jamf.

Found this on the MacAdmins Slack, but it does not seem to have been added to jamf2snipe:
https://macadmins.slack.com/archives/C81NQH7HC/p1566485883193100

@snipe
Copy link
Member

snipe commented May 17, 2022

Unfortunately, we don't have access to the MacAdmins slack :(

@kryptonit1
Copy link
Author

kryptonit1 commented May 17, 2022

My colleague made some edits to allow for more flexibility and unit conversion in the API mapping.

We can now parse through hardware > storage to grab total_ram_mb and drive_capacity_mb then / 1024 for GB like so:

[api-mapping]
name = general name
_snipeit_mac_address_1 = general mac_address
notes = location username
_snipeit_ram_2 = hardware total_ram_mb / 1024
_snipeit_hdd_3 = hardware storage drive_capacity_mb / 1024

  • multiplication also works

snipe added a commit that referenced this issue Dec 9, 2022
ParadoxGuitarist added a commit that referenced this issue Dec 28, 2022
…ath_in_settings_example

Added suggested columns from #79
@uberbrady
Copy link
Member

Unfortunately, this feature isn't actually in-place, so I've had to back out the change to show the new syntax in the settings file. I'm working on re-integrating it, however. Unfortunately the version of jamf2snipe that it's based on is pretty ancient, so it's taking a bit of spelunking.

Once I have the feature re-integrated, I'll make sure to add back in the new / 1024 syntax into the example settings file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants