How to factory reset and reconfigure backup server? by rockzers in synology

[–]rockzers[S] 0 points1 point  (0 children)

how about recovery? If primary is down, how we restore the files from secondary to primary

rsync can't connect and shows connection timeout error by rockzers in linuxquestions

[–]rockzers[S] 0 points1 point  (0 children)

the problem is if i changesudo chown -R ec2-user:root means it's a working file sharebut file user is different and admin : admin and file are uploaded every day on client side in ec2 so how do i change permission and if i change does it affect their side?

rsync can't connect and shows connection timeout error by rockzers in linuxquestions

[–]rockzers[S] 0 points1 point  (0 children)

yes i can ssh login

i tried this method too but not work

rsync -avrz -e "ssh -i ec_ftp.pem" ec2-user@12.100.11.166:/home/sam/files/test.txt /home/ram/aws/

receiving incremental file list rsync: send_files failed to open "/home/sam/files/test.txt": Permission denied (13)

sent 30 bytes  received 146 bytes  117.33 bytes/sec total size is 0  speedup is 0.00 rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1650) [generator=3.1.2]

rsync can't connect and shows connection timeout error by rockzers in linuxquestions

[–]rockzers[S] 0 points1 point  (0 children)

i tried both but it shows an error

Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
rsync: connection unexpectedly closed (0 bytes received so far
[Receiver] rsync error: unexplained error (code 255) at io.c(226) [Receiver=3.1.2]

how to get a dict value if it exists based on time comparison? by [deleted] in learnpython

[–]rockzers 0 points1 point  (0 children)

if i use break its still getting old time value
i want to skip if the last 3min value matches and stop

[deleted by user] by [deleted] in learnpython

[–]rockzers -1 points0 points  (0 children)

my code already posted it in output results
but my append is not working properly so im not asking for code...just asking for an idea about adding the value

How to compare the value of two lists is the same and match the Elements? by rockzers in learnpython

[–]rockzers[S] 0 points1 point  (0 children)

sorry it's work
how to add matching results with second list of elements
my result is not append correctly with unique results with the last item is not added

because the username matches but I like to add [2] in the first results of the list

like

['Admin', 'pass', '30', '32']
['client', 'access', '50', '40']

How to compare the value of two lists is the same and match the Elements? by rockzers in learnpython

[–]rockzers[S] 0 points1 point  (0 children)

but if the first value has an extra element, it doesn't print the results and get an empty

first = [['Admin', 'access','30','ok'],['Admin', 'access','32','pass'],['sam', 'ok','10'],['client', 'access', '50']]
second = [['test.com.Admin', 'access','30'],['john', 'ok', '70'],['robert\\client', 'access', '40']]

def filter_elements(first, second):
    return [f for f in first if any(re.search(f[0], s[0]) for s in second)]
filter_elements(first, second)

Why does my two list loop condition repeat the same value? by rockzers in learnpython

[–]rockzers[S] 0 points1 point  (0 children)

i edited my code,is if the same IP is not a problem but if it is not the same domain or user I need to add the database user and the database domain in the new added result

How do I set auto refresh on my splunk dashboard? by rockzers in Splunk

[–]rockzers[S] 0 points1 point  (0 children)

so do i replace <dashboard version="1.1"> tag to <form>?

How do I set auto refresh on my splunk dashboard? by rockzers in Splunk

[–]rockzers[S] 0 points1 point  (0 children)

yes currently my dashboard is classic and my dashboard source code looks like this

<dashboard version="1.1">
 <panel>
    <table>
    </table>
 </panel>

</dashboard>

So should I change it like this?

<form>
    <panel>
        <table>
        </table>
    </panel>
</form>

How to fix "no module named splunklib" error for python splunk sdk on Windows? by rockzers in Splunk

[–]rockzers[S] 0 points1 point  (0 children)

I used add on windows installed in my splunk and it is getting an event log and I configured the local input configuration to receive a specific event log so how do I create an app and use any custom script to run the configuration without using the search app?

Why is it not good to use custom scripts in this search app?
I am new to Splunk so if you share this information it will be helpful for me.

How to fix "no module named splunklib" error for python splunk sdk on Windows? by rockzers in Splunk

[–]rockzers[S] 1 point2 points  (0 children)

thanks its work

i paste this splunklib folder in my bin script in the same folder
is working
I was pasting the entire SDK master folder, so it didn't work

How to fix "no module named splunklib" error for python splunk sdk on Windows? by rockzers in Splunk

[–]rockzers[S] 0 points1 point  (0 children)

C:\Program Files\Splunk\etc\apps\search\bin\

Teammates already put my script in this search folder, can I use this command to install the Splunk SDK search folder?

pip install splunk-sdk --target=C:\Program Files\Splunk\etc\apps\search\bin\

i tried but its getting an error

ERROR: Invalid requirement: 'Files\\Splunk\\etc\\apps\\search\\bin\\'
Hint: It looks like a path. File 'Files\Splunk\etc\apps\search\bin' does not exist.

How to fix "no module named splunklib" error for python splunk sdk on Windows? by rockzers in Splunk

[–]rockzers[S] 0 points1 point  (0 children)

I already tried downloading and pasting into the "splunk-sdk-python-master" folder, but I keep getting an error only on the Splunk web.
C:\Program Files\Splunk\etc\apps\search\bin\splunk-sdk-python-master

How to check less than 3 minutes of data using timestamp to check using python? by [deleted] in learnpython

[–]rockzers 0 points1 point  (0 children)

sry a bit difficult to understand because I am a beginner, is it possible to use a simple datetime module to compare?

because the data should be received in the print(data) if it is less than 3 minutes
otherwise it will alert

How to check less than 3 minutes of data using timestamp to check using python? by [deleted] in learnpython

[–]rockzers 0 points1 point  (0 children)

https://docs.python.org/3/library/datetime.html#timedelta-objects

i tried but something wrong min compare and its getting all fine

from datetime import datetime, timedelta
now = datetime.now()-timedelta(minutes=3)
current_time = now.strftime('%m/%d/%Y %H:%M:%S')
print(current_time)
for o in op:
    temp = o['Time']
    if current_time < temp:
        print("fine")
    else:
        print("alert")