Skip to content

Commit

Permalink
Update to 3.0.2
Browse files Browse the repository at this point in the history
Configured the bigfix:available:fixlets for JSON output.
  • Loading branch information
codingWithJimmy committed Feb 10, 2021
1 parent 1d9f440 commit 6b12a06
Show file tree
Hide file tree
Showing 14 changed files with 136 additions and 132 deletions.
14 changes: 7 additions & 7 deletions README/inputs.conf.spec
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ global_account =
mac_address_property = Name of property which captures the MAC address of the host. See documentation for property relevance if a property is not available.
set_batch_value = Number of batches to use for ingestion. NOTE: This number should be very large in very large environments.

[bigfix_available_fixlets://<name>]
global_account =
site_name = Name of the site to collect from
fixlet_types = Select which types of fixlets to ingest.
set_batch_value = Number of batches to use for ingestion. NOTE: This number should be very large in very large environments.

[bigfix_relevant_fixlets://<name>]
global_account =
site_name = Name of the site to extract relevant fixlets from.
Expand All @@ -28,4 +22,10 @@ set_batch_value = Number of batches to use for ingestion. NOTE: This number shou
global_account =

[bigfix_users://<name>]
global_account =
global_account =

[bigfix_available_fixlets://<name>]
global_account =
site_name = Name of the site to collect from
fixlet_types = Select which types of fixlets to ingest.
set_batch_value = Number of batches to use for ingestion. NOTE: This number should be very large in very large environments.
2 changes: 1 addition & 1 deletion app.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": {
"group": null,
"name": "TA-bigfix",
"version": "3.0.0"
"version": "3.0.2"
},
"author": [
{
Expand Down
130 changes: 65 additions & 65 deletions appserver/static/js/build/globalConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"meta": {
"name": "TA-bigfix",
"displayName": "BigFix TA",
"version": "3.0.0",
"version": "3.0.1",
"apiVersion": "3.0.0",
"restRoot": "TA_bigfix"
},
Expand Down Expand Up @@ -555,8 +555,8 @@
]
},
{
"name": "bigfix_available_fixlets",
"title": "BigFix Available Fixlets",
"name": "bigfix_relevant_fixlets",
"title": "BigFix Relevant Fixlets",
"entity": [
{
"field": "name",
Expand Down Expand Up @@ -625,7 +625,7 @@
{
"field": "site_name",
"label": "Site Name",
"help": "Name of the site to collect from",
"help": "Name of the site to extract relevant fixlets from.",
"required": true,
"type": "text",
"validators": [
Expand All @@ -637,36 +637,13 @@
}
]
},
{
"field": "fixlet_types",
"label": "Fixlet Types",
"help": "Select which types of fixlets to ingest.",
"required": true,
"type": "multipleSelect",
"options": {
"delimiter": "~",
"items": [
{
"value": "Fixlet",
"label": "Fixlet"
},
{
"value": "Task",
"label": "Task"
},
{
"value": "Analysis",
"label": "Analysis"
}
]
}
},
{
"field": "set_batch_value",
"label": "Set Batch Value",
"help": "Number of batches to use for ingestion. NOTE: This number should be very large in very large environments.",
"required": true,
"type": "text",
"defaultValue": "1",
"validators": [
{
"type": "string",
Expand All @@ -679,8 +656,8 @@
]
},
{
"name": "bigfix_relevant_fixlets",
"title": "BigFix Relevant Fixlets",
"name": "bigfix_infrastructure",
"title": "BigFix Infrastructure",
"entity": [
{
"field": "name",
Expand Down Expand Up @@ -745,43 +722,12 @@
"options": {
"referenceName": "account"
}
},
{
"field": "site_name",
"label": "Site Name",
"help": "Name of the site to extract relevant fixlets from.",
"required": true,
"type": "text",
"validators": [
{
"type": "string",
"minLength": 0,
"maxLength": 8192,
"errorMsg": "Max length of text input is 8192"
}
]
},
{
"field": "set_batch_value",
"label": "Set Batch Value",
"help": "Number of batches to use for ingestion. NOTE: This number should be very large in very large environments.",
"required": true,
"type": "text",
"defaultValue": "1",
"validators": [
{
"type": "string",
"minLength": 0,
"maxLength": 8192,
"errorMsg": "Max length of text input is 8192"
}
]
}
]
},
{
"name": "bigfix_infrastructure",
"title": "BigFix Infrastructure",
"name": "bigfix_users",
"title": "BigFix Users",
"entity": [
{
"field": "name",
Expand Down Expand Up @@ -850,8 +796,8 @@
]
},
{
"name": "bigfix_users",
"title": "BigFix Users",
"name": "bigfix_available_fixlets",
"title": "BigFix Available Fixlets",
"entity": [
{
"field": "name",
Expand Down Expand Up @@ -916,6 +862,60 @@
"options": {
"referenceName": "account"
}
},
{
"field": "site_name",
"label": "Site Name",
"help": "Name of the site to collect from",
"required": true,
"type": "text",
"validators": [
{
"type": "string",
"minLength": 0,
"maxLength": 8192,
"errorMsg": "Max length of text input is 8192"
}
]
},
{
"field": "fixlet_types",
"label": "Fixlet Types",
"help": "Select which types of fixlets to ingest.",
"required": true,
"type": "multipleSelect",
"options": {
"delimiter": "~",
"items": [
{
"value": "Fixlet",
"label": "Fixlet"
},
{
"value": "Task",
"label": "Task"
},
{
"value": "Analysis",
"label": "Analysis"
}
]
}
},
{
"field": "set_batch_value",
"label": "Set Batch Value",
"help": "Number of batches to use for ingestion. NOTE: This number should be very large in very large environments.",
"required": true,
"type": "text",
"validators": [
{
"type": "string",
"minLength": 0,
"maxLength": 8192,
"errorMsg": "Max length of text input is 8192"
}
]
}
]
}
Expand Down
28 changes: 14 additions & 14 deletions bin/TA_bigfix_rh_bigfix_available_fixlets.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,53 +20,53 @@
encrypted=False,
default=None,
validator=validator.Pattern(
regex=r"""^\-[1-9]\d*$|^\d*$""",
regex=r"""^\-[1-9]\d*$|^\d*$""",
)
),
),
field.RestField(
'index',
required=True,
encrypted=False,
default='default',
validator=validator.String(
min_len=1,
max_len=80,
min_len=1,
max_len=80,
)
),
),
field.RestField(
'global_account',
required=True,
encrypted=False,
default=None,
validator=None
),
),
field.RestField(
'site_name',
required=True,
encrypted=False,
default=None,
validator=validator.String(
min_len=0,
max_len=8192,
min_len=0,
max_len=8192,
)
),
),
field.RestField(
'fixlet_types',
required=True,
encrypted=False,
default=None,
validator=None
),
),
field.RestField(
'set_batch_value',
required=True,
encrypted=False,
default='1',
default=None,
validator=validator.String(
min_len=0,
max_len=8192,
min_len=0,
max_len=8192,
)
),
),

field.RestField(
'disabled',
Expand Down
24 changes: 12 additions & 12 deletions bin/TA_bigfix_rh_bigfix_clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,46 +20,46 @@
encrypted=False,
default=None,
validator=validator.Pattern(
regex=r"""^\-[1-9]\d*$|^\d*$""",
regex=r"""^\-[1-9]\d*$|^\d*$""",
)
),
),
field.RestField(
'index',
required=True,
encrypted=False,
default='default',
validator=validator.String(
min_len=1,
max_len=80,
min_len=1,
max_len=80,
)
),
),
field.RestField(
'global_account',
required=True,
encrypted=False,
default=None,
validator=None
),
),
field.RestField(
'mac_address_property',
required=True,
encrypted=False,
default=None,
validator=validator.String(
min_len=0,
max_len=8192,
min_len=0,
max_len=8192,
)
),
),
field.RestField(
'set_batch_value',
required=True,
encrypted=False,
default='1',
default=None,
validator=validator.String(
min_len=0,
max_len=8192,
max_len=8192,
)
),
),

field.RestField(
'disabled',
Expand Down
11 changes: 6 additions & 5 deletions bin/input_module_bigfix_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def validate_input(helper, definition):
# This example accesses the modular input variable
# global_account = definition.parameters.get('global_account', None)
pass

def collect_events(helper, ew):
opt_root_url = helper.get_global_setting('bigfix_server_url')
sourcee= helper.get_input_stanza_names()
Expand All @@ -27,11 +27,11 @@ def collect_events(helper, ew):
account = opt_global_account["username"] + ":" + opt_global_account["password"]
base64string = base64.b64encode(account.encode()).decode()
headers = { 'Authorization' : 'Basic %s' % base64string }

opt_url_start=opt_root_url + ":" + opt_rest_api_port + "/api/query?output=json&relevance="

query='%28%22nt_host%3D%22+%26+item+0+of+it%2C+%22client_id%3D%22+%26+item+12+of+it%2C+%22status%3D%22+%26+item+1+of+it%2C+%22issuer%3D%22+%26+item+2+of+it%2C+%22issue_time%3D%22+%26+item+3+of+it%2C+%22end_time%3D%22+%26+item+4+of+it%2C+%22start_time%3D%22+%26+item+5+of+it%2C+%22action_id%3D%22+%26+item+6+of+it%2C+%22action_name%3D%22+%26+item+7+of+it%2C+%22reapply%3D%22+%26+item+8+of+it%2C+%22restart_required%3D%22+%26+item+9+of+it%2C+%22stopper%3D%22+%26+item+10+of+it%2C+%22time_stopped%3D%22+%26+item+11+of+it%29+of+%28name+of+computers+of+item+0+of+it+as+string%2C+status+of+item+0+of+it+as+string%2C+name+of+issuer+of+item+1+of+it+as+string%2C+time+issued+of+item+1+of+it+as+string%2C+%28if+%28exists+end+date+of+item+1+of+it%29+then+end+date+of+item+1+of+it+as+string+%26+%22+%22+%26+end+time_of_day+of+item+1+of+it+as+string+else+%22%22%29%2C+%28if+%28exists+start+date+of+item+1+of+it%29+then+start+date+of+item+1+of+it+as+string+%26+%22+%22+%26+start+time_of_day+of+item+1+of+it+as+string+else+%22%22%29%2C+id+of+item+1+of+it+as+string%2C+%28concatenation+%22%252527%22+of+%28substrings+separated+by+%22%252522%22+of+name+of+item+1+of+it+as+string%29%29%2C+reapply+flag+of+item+1+of+it+as+string%2C+restart+flag+of+item+1+of+it+as+string%2C+%28if+%28exists+stopper+of+item+1+of+it%29+then+name+of+stopper+of+item+1+of+it+as+string+else+%22%22%29%2C+%28if+%28exists+time+stopped+of+item+1+of+it%29+then+time+stopped+of+item+1+of+it+as+string+else+%22%22%29%2C+%28id+of+computers+of+item+0+of+it+as+string%29%29+of+%28results+of+it%2C+it%29+of+%28bes+actions+whose+%28id+of+computers+of+results+of+it+mod+SETS%3DRESULT%29%29'.replace("SETS", opt_sets)

query='%28%22nt_host%3D%22+%26+item+0+of+it%2C+%22client_id%3D%22+%26+item+12+of+it%2C+%22status%3D%22+%26+item+1+of+it%2C+%22issuer%3D%22+%26+item+2+of+it%2C+%22issue_time%3D%22+%26+item+3+of+it%2C+%22end_time%3D%22+%26+item+4+of+it%2C+%22start_time%3D%22+%26+item+5+of+it%2C+%22action_id%3D%22+%26+item+6+of+it%2C+%22action_name%3D%22+%26+item+7+of+it%2C+%22reapply%3D%22+%26+item+8+of+it%2C+%22restart_required%3D%22+%26+item+9+of+it%2C+%22stopper%3D%22+%26+item+10+of+it%2C+%22time_stopped%3D%22+%26+item+11+of+it%29+of+%28name+of+computers+of+item+0+of+it+as+string%2C+status+of+item+0+of+it+as+string%2C+name+of+issuer+of+item+1+of+it+as+string%2C+time+issued+of+item+1+of+it+as+string%2C+%28if+%28exists+end+date+of+item+1+of+it%29+then+end+date+of+item+1+of+it+as+string+%26+%22+%22+%26+end+time_of_day+of+item+1+of+it+as+string+else+%22%22%29%2C+%28if+%28exists+start+date+of+item+1+of+it%29+then+start+date+of+item+1+of+it+as+string+%26+%22+%22+%26+start+time_of_day+of+item+1+of+it+as+string+else+%22%22%29%2C+id+of+item+1+of+it+as+string%2C+%28concatenation+%22%252527%22+of+%28substrings+separated+by+%22%252522%22+of+name+of+item+1+of+it+as+string%29%29%2C+reapply+flag+of+item+1+of+it+as+string%2C+restart+flag+of+item+1+of+it+as+string%2C+%28if+%28exists+stopper+of+item+1+of+it%29+then+name+of+stopper+of+item+1+of+it+as+string+else+%22%22%29%2C+%28if+%28exists+time+stopped+of+item+1+of+it%29+then+time+stopped+of+item+1+of+it+as+string+else+%22%22%29%2C+%28it+mod+SETS+%3D+RESULT+of+it%29+of+id+of+computers+of+item+0+of+it+as+string%29+of+%28results+of+it%2C+it%29+of+%28bes+actions%29'.replace("SETS", opt_sets)
urlb=opt_url_start + query

helper.log_info("Beginning job="+sourcee)
Expand All @@ -57,7 +57,7 @@ def collect_events(helper, ew):
helper.log_error("job="+sourcee+" Response for MOD loop="+str(x)+" code="+str(response.status_code))
if y == 99:
helper.log_error("job="+sourcee+" Total Failure. Exiting " + response.text )
return
return
helper.log_error("job="+sourcee+" Sleeping for 1 minute and retry="+str(y))
time.sleep(30)
helper.log_info("job="+sourcee+" Response for MOD loop="+str(x)+" code="+str(response.status_code))
Expand All @@ -78,3 +78,4 @@ def collect_events(helper, ew):
ew.write_event(event)
helper.log_info("job="+sourcee+" Ending MOD loop="+str(x))
helper.log_info("Ending job="+sourcee)

Loading

0 comments on commit 6b12a06

Please sign in to comment.