-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcustom_fields-example.json
More file actions
96 lines (96 loc) · 3.78 KB
/
custom_fields-example.json
File metadata and controls
96 lines (96 loc) · 3.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
{
"enabled_static_fields": {
"mac_address": {
"enabled": true,
"field_name": "_snipeit_mac_address_1"
},
"total_storage": {
"enabled": true,
"field_name": "_snipeit_total_storage_6"
},
"storage_information": {
"enabled": true,
"field_name": "_snipeit_storage_information_7"
},
"disk_space_used": {
"enabled": true,
"field_name": "_snipeit_disk_space_used_13"
},
"pyitagent_version": {
"enabled": true,
"field_name": "_snipeit_pyitagent_14"
}
},
"custom_fields": {
"_snipeit_operating_system_3": {
"name": "Operating System",
"enabled": true,
"ps_command": "(Get-WmiObject Win32_OperatingSystem).Caption",
"float_number": false
},
"_snipeit_os_install_date_4": {
"name": "OS Install Date",
"enabled": true,
"ps_command": "[math]::Round((New-TimeSpan -Start (Get-Date '1970-01-01') -End (Get-CimInstance Win32_OperatingSystem).InstallDate).TotalSeconds)",
"float_number": false
},
"_snipeit_memory_ram_2": {
"name": "Memory / RAM",
"enabled": true,
"ps_command": "[Math]::Round((Get-WmiObject Win32_ComputerSystem).totalphysicalmemory / 1gb,1)",
"float_number": true
},
"_snipeit_ram_used_12": {
"name": "RAM Usage",
"enabled": true,
"ps_command": "[Math]::Round(((Get-WmiObject Win32_ComputerSystem).TotalPhysicalMemory - (Get-WmiObject Win32_OperatingSystem).FreePhysicalMemory * 1024) / 1GB, 2)",
"float_number": true
},
"_snipeit_bios_release_date_10": {
"name": "BIOS Release Date",
"enabled": true,
"ps_command": "[math]::Round((New-TimeSpan -Start (Get-Date '1970-01-01') -End (Get-CimInstance Win32_BIOS).ReleaseDate).TotalSeconds)",
"float_number": false
},
"_snipeit_ip_address_9": {
"name": "IP Address",
"enabled": true,
"ps_command": "(Test-Connection (hostname) -count 1).IPv4Address.IPAddressToString",
"float_number": false
},
"_snipeit_processor_cpu_8": {
"name": "Processor / CPU",
"enabled": true,
"ps_command": "(gwmi Win32_processor).name",
"float_number": false
},
"_snipeit_windows_username_11": {
"name": "Windows Username",
"enabled": true,
"ps_command": "[System.Security.Principal.WindowsIdentity]::GetCurrent().Name",
"float_number": false
},
"_snipeit_cpu_usage_15": {
"name": "CPU Usage",
"enabled": false,
"ps_command": "$Samples = 5; $Interval = 1; $i=0; $Total=0; while ($i -lt $Samples) { $Total += (Get-Counter '\\Processor(_Total)\\% Processor Time').CounterSamples.CookedValue; Start-Sleep -Seconds $Interval; $i++ }; $Average = $Total / $Samples; $Average",
"float_number": true
}
},
"monitor_fields": {
"custom_fields": {
"_snipeit_screen_size_21": {
"name": "Screen Size",
"enabled": true,
"ps_command": "(Get-WmiObject -Namespace root\\wmi -Class WmiMonitorBasicDisplayParams | Select-Object -First 1).MaxHorizontalImageSize",
"float_number": true
},
"_snipeit_windows_username_11": {
"name": "Windows Username",
"enabled": true,
"ps_command": "[System.Security.Principal.WindowsIdentity]::GetCurrent().Name",
"float_number": false
}
}
}
}